From f0460292c9ab0d3a19aae530a59e6c195132092a Mon Sep 17 00:00:00 2001 From: "timeless%mac.com" Date: Fri, 11 May 2001 06:22:11 +0000 Subject: [PATCH] Bugzilla Bug 79213 nsEventStateManager::PreHandleEvent dereference a NULL nsCOMPtr with operator->().: bandage fix. r=saari sr=jst. --- content/events/src/nsEventStateManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/events/src/nsEventStateManager.cpp b/content/events/src/nsEventStateManager.cpp index 9e14c1359c7..88a9d4e7535 100644 --- a/content/events/src/nsEventStateManager.cpp +++ b/content/events/src/nsEventStateManager.cpp @@ -480,6 +480,8 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext, nsCOMPtr globalObj; mDocument->GetScriptGlobalObject(getter_AddRefs(globalObj)); nsCOMPtr win(do_QueryInterface(globalObj)); + NS_ASSERTION(win, "win is null. this happens [often on xlib builds]. see bug #79213"); + if (!win) return NS_ERROR_NULL_POINTER; win->GetRootFocusController(getter_AddRefs(focusController)); if (focusController) {