diff --git a/hal/Hal.cpp b/hal/Hal.cpp index 2265fe1176e04..c8e25690bc619 100644 --- a/hal/Hal.cpp +++ b/hal/Hal.cpp @@ -64,6 +64,7 @@ void AssertMainThread() { MOZ_ASSERT(NS_IsMainThread()); } bool InSandbox() { return GeckoProcessType_Content == XRE_GetProcessType(); } bool WindowIsActive(nsPIDOMWindowInner* aWindow) { + NS_ENSURE_TRUE(aWindow, false); dom::Document* document = aWindow->GetDoc(); NS_ENSURE_TRUE(document, false); return !document->Hidden();