зеркало из https://github.com/mozilla/gecko-dev.git
Fix a crash on cbs.com in Mac mach-o builds by making sure to check the return value from initializing the image frame (which fails on mac for images wider that 4096 pixels or so). Bug 149091, r=saari, sr=ben.
This commit is contained in:
Родитель
466c6dd441
Коммит
2432b1991a
|
@ -417,9 +417,12 @@ int HaveDecodedRow(
|
|||
|
||||
// initalize the frame and append it to the container
|
||||
decoder->mImageFrame = do_CreateInstance("@mozilla.org/gfx/image/frame;2");
|
||||
decoder->mImageFrame->Init(
|
||||
decoder->mGIFStruct->x_offset, decoder->mGIFStruct->y_offset,
|
||||
decoder->mGIFStruct->width, decoder->mGIFStruct->height, format);
|
||||
if (NS_FAILED(decoder->mImageFrame->Init(
|
||||
decoder->mGIFStruct->x_offset, decoder->mGIFStruct->y_offset,
|
||||
decoder->mGIFStruct->width, decoder->mGIFStruct->height, format))) {
|
||||
decoder->mImageFrame = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
decoder->mImageContainer->AppendFrame(decoder->mImageFrame);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче