зеркало из https://github.com/mozilla/pjs.git
Bug 695498. Backout 7aa60d6408b3.
mDecoder can go NULL when we don't expect it.
This commit is contained in:
Родитель
f79876c23d
Коммит
7bfdd35869
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче