summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2010-09-07 10:48:06 -0600
committerXiaohong Bao <bao@lindenlab.com>2010-09-07 10:48:06 -0600
commit497d35af488f25061ea6833539cd8e3c05e4a5b2 (patch)
tree5adc3e103bfbed2a6142a8871886fca66aa8cf2c /indra/newview
parenta6e94d201612dcf601aba2a665ddaf86745c9803 (diff)
fix for VWR-22813: crash at [1] LLImageBase::allocateData(int) [secondlife-bin llimage.cpp]
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewerwindow.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 13db913f60..fbd21d5fe6 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -3901,7 +3901,14 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
image_buffer_x = llfloor(snapshot_width*scale_factor) ;
image_buffer_y = llfloor(snapshot_height *scale_factor) ;
}
- raw->resize(image_buffer_x, image_buffer_y, 3);
+ if(image_buffer_x > 0 && image_buffer_y > 0)
+ {
+ raw->resize(image_buffer_x, image_buffer_y, 3);
+ }
+ else
+ {
+ return FALSE ;
+ }
if(raw->isBufferInvalid())
{
return FALSE ;