diff --git a/dom/ipc/BrowserParent.cpp b/dom/ipc/BrowserParent.cpp index 92e5cb37b239..3df0d4fde821 100644 --- a/dom/ipc/BrowserParent.cpp +++ b/dom/ipc/BrowserParent.cpp @@ -536,7 +536,7 @@ void BrowserParent::SetOwnerElement(Element* aElement) { // Set our BrowsingContext's embedder if we're not embedded within a // BrowserBridgeParent. - if (!GetBrowserBridgeParent() && mBrowsingContext) { + if (!GetBrowserBridgeParent() && mBrowsingContext && mFrameElement) { mBrowsingContext->SetEmbedderElement(mFrameElement); }