From c844a96d8f7f784b83bd6e55fd4ae2a864f778f0 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 4 Mar 2009 13:58:43 -0500 Subject: [PATCH] Wallpaper for bug 480300. --- content/html/content/src/nsHTMLAnchorElement.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/html/content/src/nsHTMLAnchorElement.cpp b/content/html/content/src/nsHTMLAnchorElement.cpp index 261ac99cac..28ad59995b 100644 --- a/content/html/content/src/nsHTMLAnchorElement.cpp +++ b/content/html/content/src/nsHTMLAnchorElement.cpp @@ -223,9 +223,10 @@ nsHTMLAnchorElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent, void nsHTMLAnchorElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent) { - if (IsInDoc()) { + nsIDocument* doc = GetCurrentDoc(); + if (doc) { RegUnRegAccessKey(PR_FALSE); - GetCurrentDoc()->ForgetLink(this); + doc->ForgetLink(this); // If this link is ever reinserted into a document, it might // be under a different xml:base, so forget the cached state now mLinkState = eLinkState_Unknown; -- 2.11.4.GIT