From 3007ae63b9860eaa32ace6271240971a5f14d1d1 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Thu, 4 Sep 2008 21:47:36 +0200 Subject: [PATCH] Make sure we have a pres context. b=453278 r+sr=bzbarsky --- content/xml/content/src/nsXMLElement.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/xml/content/src/nsXMLElement.cpp b/content/xml/content/src/nsXMLElement.cpp index 5fb4f6765dd1..673e17605854 100644 --- a/content/xml/content/src/nsXMLElement.cpp +++ b/content/xml/content/src/nsXMLElement.cpp @@ -188,7 +188,9 @@ nsXMLElement::MaybeTriggerAutoLink(nsIDocShell *aShell) nsresult rv = DocShellToPresContext(aShell, getter_AddRefs(pc)); NS_ENSURE_SUCCESS(rv, rv); - nsContentUtils::TriggerLink(this, pc, absURI, target, PR_TRUE, PR_FALSE); + if (pc) { + nsContentUtils::TriggerLink(this, pc, absURI, target, PR_TRUE, PR_FALSE); + } return special_rv; // return GetLinkTargetAndAutoType's special rv! }