From d66ab16c1569c91fe085763db89a56e3e312db0d Mon Sep 17 00:00:00 2001 From: Seth Fowler Date: Mon, 15 Apr 2013 14:34:18 -0700 Subject: [PATCH] Bug 859718 - Don't assume we have mImageRequest in RasterImage::IsDecodeFinished. r=joe --HG-- extra : rebase_source : ec57c42b17398f0c90d19f35834e389444059b7f --- image/src/RasterImage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/image/src/RasterImage.cpp b/image/src/RasterImage.cpp index b2e88bc9295e..19cca9bd4a94 100644 --- a/image/src/RasterImage.cpp +++ b/image/src/RasterImage.cpp @@ -3278,7 +3278,6 @@ RasterImage::IsDecodeFinished() // Precondition mDecodingMutex.AssertCurrentThreadOwns(); NS_ABORT_IF_FALSE(mDecoder, "Can't call IsDecodeFinished() without decoder!"); - MOZ_ASSERT(mDecodeRequest); // The decode is complete if we got what we wanted. if (mDecoder->IsSizeDecode()) { @@ -3288,11 +3287,12 @@ RasterImage::IsDecodeFinished() } else if (mDecoder->GetDecodeDone()) { return true; } - + // If the decoder returned because it needed a new frame and we haven't // written to it since then, the decoder may be storing data that it hasn't // decoded yet. - if (mDecoder->NeedsNewFrame() || mDecodeRequest->mAllocatedNewFrame) { + if (mDecoder->NeedsNewFrame() || + (mDecodeRequest && mDecodeRequest->mAllocatedNewFrame)) { return false; }