diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index e824c9541..5346ba11d 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -9411,7 +9411,9 @@ void nsGlobalWindow::SetActive(bool aActive) { nsPIDOMWindow::SetActive(aActive); - NotifyDocumentTree(mDoc, nullptr); + if (mDoc) { + NotifyDocumentTree(mDoc, nullptr); + } } void nsGlobalWindow::SetIsBackground(bool aIsBackground)