Index: third_party/WebKit/Source/core/layout/LayoutImage.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutImage.cpp b/third_party/WebKit/Source/core/layout/LayoutImage.cpp |
index 87eedf886ff89bc7a5becb33965d20544de5662a..0c856253d9ea007bee00e68b3748d9b26f03279e 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutImage.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutImage.cpp |
@@ -244,9 +244,11 @@ bool LayoutImage::foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, |
ObjectFit objectFit = style()->objectFit(); |
if (objectFit != ObjectFitFill && objectFit != ObjectFitCover) |
return false; |
+ if (!m_imageResource->cachedImage()) |
+ return false; |
// Check for image with alpha. |
TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "PaintImage", "data", InspectorPaintImageEvent::data(this, *m_imageResource->cachedImage())); |
- return m_imageResource->cachedImage() && m_imageResource->cachedImage()->image()->currentFrameKnownToBeOpaque(Image::PreCacheMetadata); |
+ return m_imageResource->cachedImage()->image()->currentFrameKnownToBeOpaque(Image::PreCacheMetadata); |
} |
bool LayoutImage::computeBackgroundIsKnownToBeObscured() const |