Index: third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp |
index c48fbe6b0b1492f8f41e49800b154b60cf5ed856..4db763004ca60857e47b8363b211ff08ad421198 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp |
@@ -555,7 +555,8 @@ bool HTMLPlugInElement::allowedToLoadObject(const KURL& url, const String& mimeT |
fastGetAttribute(HTMLNames::typeAttr); |
if (!document().contentSecurityPolicy()->allowObjectFromSource(url) |
|| !document().contentSecurityPolicy()->allowPluginTypeForDocument(document(), mimeType, declaredMimeType, url)) { |
- layoutEmbeddedItem().setPluginUnavailabilityReason(LayoutEmbeddedObject::PluginBlockedByContentSecurityPolicy); |
+ if (LayoutEmbeddedItem layoutItem = layoutEmbeddedItem()) |
+ layoutItem.setPluginUnavailabilityReason(LayoutEmbeddedObject::PluginBlockedByContentSecurityPolicy); |
return false; |
} |
// If the URL is empty, a plugin could still be instantiated if a MIME-type |