summaryrefslogtreecommitdiffstats
path: root/dom/xslt/base/txURIUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/xslt/base/txURIUtils.cpp')
-rw-r--r--dom/xslt/base/txURIUtils.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/dom/xslt/base/txURIUtils.cpp b/dom/xslt/base/txURIUtils.cpp
index 3f3556f80..bce2f8d0f 100644
--- a/dom/xslt/base/txURIUtils.cpp
+++ b/dom/xslt/base/txURIUtils.cpp
@@ -45,6 +45,10 @@ void URIUtils::resolveHref(const nsAString& href, const nsAString& base,
void
URIUtils::ResetWithSource(nsIDocument *aNewDoc, nsINode *aSourceNode)
{
+ if (!aSourceNode) {
+ return;
+ }
+
nsCOMPtr<nsIDocument> sourceDoc = aSourceNode->OwnerDoc();
nsIPrincipal* sourcePrincipal = sourceDoc->NodePrincipal();