Fix crasher 151568 caused by my checkin for focus bug 131651. r=dbaron, sr=blake.

This commit is contained in:
bryner%netscape.com 2002-06-15 23:38:06 +00:00
parent 06abdde379
commit 08bd6fa15e

View File

@ -1438,7 +1438,7 @@ nsGenericHTMLElement::HandleDOMEventForAnchors(nsIContent* aOuter,
// don't make the link grab the focus if there is no link handler
nsCOMPtr<nsILinkHandler> 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.