diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 904ff53480bf..da0e3986430f 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -2195,7 +2195,7 @@ nsStyleImage::ComputeActualCropRect(nsIntRect& aActualCropRect, nsresult nsStyleImage::StartDecoding() const { - if ((mType == eStyleImageType_Image) && mImage) { + if (mType == eStyleImageType_Image) { return mImage->StartDecoding(); } return NS_OK; diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index 0ad6fd9a68e7..38ce2dc8b727 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -365,6 +365,7 @@ struct nsStyleImage } imgRequestProxy* GetImageData() const { MOZ_ASSERT(mType == eStyleImageType_Image, "Data is not an image!"); + MOZ_ASSERT(mImage); MOZ_ASSERT(mImageTracked, "Should be tracking any image we're going to use!"); return mImage;