Xiaohong Bao 2010-09-07 13:27:49 -06:00
commit a0611b5a01
2 changed files with 9 additions and 2 deletions

View File

@ -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;
}
}

View File

@ -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 ;