diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-09-08 13:37:27 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-09-08 13:37:27 -0400 |
commit | 5b017f14bc323256adf29af9396bb7d22ebcf731 (patch) | |
tree | db40c1c707786ce3a3c4254c611ffabdf31325e9 | |
parent | 074f4c8c59eebbf109c2846c35cdab05f3997db8 (diff) | |
parent | a0611b5a01a2f1eb336d4a69808b7b7f294cbc32 (diff) |
automated merge
-rw-r--r-- | indra/llimage/llimage.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index be0ab9fcb7..5c33b675ca 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -147,7 +147,7 @@ U8* LLImageBase::allocateData(S32 size) size = mWidth * mHeight * mComponents; if (size <= 0) { - llerrs << llformat("LLImageBase::allocateData called with bad dimensions: %dx%dx%d",mWidth,mHeight,mComponents) << llendl; + llerrs << llformat("LLImageBase::allocateData called with bad dimensions: %dx%dx%d",mWidth,mHeight,(S32)mComponents) << llendl; } } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 556451e390..43d18c6d83 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3911,7 +3911,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 ; |