Bug 1290747 - Fix bad assert in RasterImage::NotifyProgress(). r=edwin, a=ritu
authorSeth Fowler <mark.seth.fowler@gmail.com>
Sun, 31 Jul 2016 14:35:37 -0700
changeset 401812 587904a10d9a4f2934a5cff85c9415ad2fb5cb56
parent 401811 cc6d15ffcabec35355b7c3d56b7d147ab8fb448b
child 401813 291a9823eb6a705207b738ddb79b7b86bddc4db8
push id26584
push userbmo:jgilbert@mozilla.com
push dateWed, 17 Aug 2016 19:34:22 +0000
reviewersedwin, ritu
bugs1290747
milestone50.0a2
Bug 1290747 - Fix bad assert in RasterImage::NotifyProgress(). r=edwin, a=ritu
image/RasterImage.cpp
--- a/image/RasterImage.cpp
+++ b/image/RasterImage.cpp
@@ -1635,17 +1635,17 @@ RasterImage::NotifyProgress(Progress aPr
   const bool wasDefaultFlags = aSurfaceFlags == DefaultSurfaceFlags();
 
   if (!aInvalidRect.IsEmpty() && wasDefaultFlags) {
     // Update our image container since we're invalidating.
     UpdateImageContainer();
   }
 
   // We may have decoded new animation frames; update our animation state.
-  MOZ_ASSERT_IF(aFrameCount && *aFrameCount > 1, mAnimationState);
+  MOZ_ASSERT_IF(aFrameCount && *aFrameCount > 1, mAnimationState || mError);
   if (mAnimationState && aFrameCount) {
     mAnimationState->UpdateKnownFrameCount(*aFrameCount);
   }
 
   // If we should start animating right now, do so.
   if (mAnimationState && aFrameCount == Some(1u) &&
       mPendingAnimation && ShouldAnimate()) {
     StartAnimation();