Bug 1290747 - Fix bad assert in RasterImage::NotifyProgress(). r=edwin
authorSeth Fowler <mark.seth.fowler@gmail.com>
Sun, 31 Jul 2016 14:35:37 -0700
changeset 395374 7d45b49f61d5026ac5ad5f0c36509a018dea3926
parent 395373 0ccc93566e33f04ecca6286bd8a01c699d2c8633
child 395375 9d668735beb37a324c6b17337cfacf0b181849d4
push id24763
push userbmo:mh+mozilla@glandium.org
push dateTue, 02 Aug 2016 04:27:00 +0000
reviewersedwin
bugs1290747
milestone50.0a1
Bug 1290747 - Fix bad assert in RasterImage::NotifyProgress(). r=edwin
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();