Bug 1258111 - Fix crash in CheckPolicy. r=billm

This commit is contained in:
Christoph Kerschbaumer 2016-06-23 09:40:51 +02:00
parent 577b657567
commit 0d99d638ef

View File

@ -160,7 +160,9 @@ nsContentPolicy::CheckPolicy(CPMethod policyMethod,
if (window) {
nsCOMPtr<nsIDocShell> docShell = window->GetDocShell();
nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(docShell);
loadContext->GetTopFrameElement(getter_AddRefs(topFrameElement));
if (loadContext) {
loadContext->GetTopFrameElement(getter_AddRefs(topFrameElement));
}
MOZ_ASSERT(window->IsOuterWindow());