From 08bd6fa15ef776536c9cf79e90f2fcc6f3594b51 Mon Sep 17 00:00:00 2001 From: "bryner%netscape.com" Date: Sat, 15 Jun 2002 23:38:06 +0000 Subject: [PATCH] Fix crasher 151568 caused by my checkin for focus bug 131651. r=dbaron, sr=blake. --- content/html/content/src/nsGenericHTMLElement.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp index ba21d84c35ef..b25b7deee898 100644 --- a/content/html/content/src/nsGenericHTMLElement.cpp +++ b/content/html/content/src/nsGenericHTMLElement.cpp @@ -1438,7 +1438,7 @@ nsGenericHTMLElement::HandleDOMEventForAnchors(nsIContent* aOuter, // don't make the link grab the focus if there is no link handler nsCOMPtr handler; nsresult rv = aPresContext->GetLinkHandler(getter_AddRefs(handler)); - if (NS_SUCCEEDED(rv) && handler) { + if (NS_SUCCEEDED(rv) && handler && mDocument) { // If the window is not active, do not allow the focus to bring the // window to the front. We update the focus controller, but do // nothing else.