mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 13:55:35 +08:00
Always close script linemap file after reading and always dispose of other streams in the script engine even if exceptions are thrown.
This commit is contained in:
@@ -1065,10 +1065,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
{
|
||||
try
|
||||
{
|
||||
FileStream fs = File.Create(Path.Combine(Path.GetDirectoryName(assembly), ItemID.ToString() + ".state"));
|
||||
Byte[] buf = Util.UTF8NoBomEncoding.GetBytes(xml);
|
||||
fs.Write(buf, 0, buf.Length);
|
||||
fs.Close();
|
||||
using (FileStream fs = File.Create(Path.Combine(Path.GetDirectoryName(assembly), ItemID.ToString() + ".state")))
|
||||
{
|
||||
Byte[] buf = Util.UTF8NoBomEncoding.GetBytes(xml);
|
||||
fs.Write(buf, 0, buf.Length);
|
||||
}
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user