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:
bryner%netscape.com 2002-06-15 06:40:15 +00:00
Родитель 466c6dd441
Коммит 2432b1991a
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

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