From 0acd996e03be917b7e3e64f4486f1fde15b9fd63 Mon Sep 17 00:00:00 2001 From: roytam1 Date: Sun, 14 Apr 2024 20:39:31 +0800 Subject: [PATCH] dom: check mDoc before use, as it can be null --- dom/base/nsGlobalWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index da2e5267f0..ce025a42f5 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -3550,7 +3550,7 @@ nsGlobalWindow::GetEventTargetParent(EventChainPreVisitor& aVisitor) aVisitor.mCanHandle = true; // Middle/right click shouldn't dispatch click event, use auxclick to instead. - if (mDoc->IsXULDocument()) { + if (mDoc && mDoc->IsXULDocument()) { aVisitor.mForceContentDispatch = true; //FIXME! Bug 329119 } if (msg == eResize && aVisitor.mEvent->IsTrusted()) {