Index: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp |
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp |
index 601b66535037f5f7b3d77c60a933c98215561240..85167e069743e3d1d0fe1ca0b050c28fad75867a 100644 |
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp |
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp |
@@ -223,7 +223,7 @@ DEFINE_TRACE(ContentSecurityPolicy) |
Document* ContentSecurityPolicy::document() const |
{ |
- return m_executionContext->isDocument() ? toDocument(m_executionContext) : nullptr; |
+ return (m_executionContext && m_executionContext->isDocument()) ? toDocument(m_executionContext) : nullptr; |
} |
void ContentSecurityPolicy::copyStateFrom(const ContentSecurityPolicy* other) |