Bug 695498. Backout 7aa60d6408b3.

mDecoder can go NULL when we don't expect it.
This commit is contained in:
Jeff Muizelaar 2011-11-04 13:47:28 -04:00
Родитель f79876c23d
Коммит 7bfdd35869
1 изменённых файлов: 10 добавлений и 7 удалений

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

@ -2281,13 +2281,16 @@ RasterImage::WriteToDecoder(const char *aBuffer, PRUint32 aCount)
curframe->UnlockImageData();
}
nsresult status = mDecoder->GetDecoderError();
if (NS_SUCCEEDED(status)) {
// Keep track of the total number of bytes written over the lifetime of the
// decoder
mBytesDecoded += aCount;
}
return status;
if (!mDecoder)
return NS_ERROR_FAILURE;
CONTAINER_ENSURE_SUCCESS(mDecoder->GetDecoderError());
// Keep track of the total number of bytes written over the lifetime of the
// decoder
mBytesDecoded += aCount;
return NS_OK;
}
// This function is called in situations where it's clear that we want the