Index: third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
index 04ae3c0f4c4b88d04dc13ea5d87e69732cfcd376..7a0313fae719bef765ae9769aa784621adb834e7 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
@@ -92,7 +92,7 @@ void HTMLVideoElement::attach(const AttachContext& context) |
if (!m_imageLoader) |
m_imageLoader = HTMLImageLoader::create(this); |
m_imageLoader->updateFromElement(); |
- if (layoutObject()) |
+ if (hasLayoutObject()) |
toLayoutImage(layoutObject())->imageResource()->setImageResource(m_imageLoader->image()); |
} |
} |
@@ -129,7 +129,7 @@ void HTMLVideoElement::parseAttribute(const QualifiedName& name, const AtomicStr |
m_imageLoader = HTMLImageLoader::create(this); |
m_imageLoader->updateFromElement(ImageLoader::UpdateIgnorePreviousError); |
} else { |
- if (layoutObject()) |
+ if (hasLayoutObject()) |
toLayoutImage(layoutObject())->imageResource()->setImageResource(0); |
} |
// Notify the player when the poster image URL changes. |