Thanks Snoopy for a patch that addresses Mantis #0005165: osSetDynamicTextureURL crashed region server

Signed-off-by: dahlia <dahliaTrimble@gmail.removeme.com>
viewer-2-initial-appearance
dahlia 2010-11-02 02:35:56 -07:00
parent 2bce1716af
commit ed7959ddfb
1 changed files with 32 additions and 32 deletions

View File

@ -175,6 +175,8 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
{
stream = response.GetResponseStream();
if (stream != null)
{
try
{
Bitmap image = new Bitmap(stream);
Size newsize;
@ -207,13 +209,11 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
Bitmap resize = new Bitmap(image, newsize);
try
{
imageJ2000 = OpenJPEG.EncodeFromImage(resize, true);
}
catch (Exception)
{
m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Encode Failed. Empty byte data returned!");
m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Conversion Failed. Empty byte data returned!");
}
}
else