Ensure closure of bitmap and memory stream with using() statements in WorldViewModule.
If this has any effect then it will only be to the map images returned via requests to the /worldview simulator HTTP path (not enabled by default)0.7.4.1
parent
6adc810eaa
commit
abf94627f6
|
@ -113,14 +113,15 @@ namespace OpenSim.Region.OptionalModules.World.WorldView
|
||||||
if (!m_Enabled)
|
if (!m_Enabled)
|
||||||
return new Byte[0];
|
return new Byte[0];
|
||||||
|
|
||||||
Bitmap bmp = m_Generator.CreateViewImage(pos, rot, fov, width,
|
using (Bitmap bmp = m_Generator.CreateViewImage(pos, rot, fov, width, height, usetex))
|
||||||
height, usetex);
|
{
|
||||||
|
using (MemoryStream str = new MemoryStream())
|
||||||
|
{
|
||||||
|
bmp.Save(str, ImageFormat.Jpeg);
|
||||||
|
|
||||||
MemoryStream str = new MemoryStream();
|
return str.ToArray();
|
||||||
|
}
|
||||||
bmp.Save(str, ImageFormat.Jpeg);
|
}
|
||||||
|
|
||||||
return str.ToArray();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue