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
parent
2bce1716af
commit
ed7959ddfb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue