summaryrefslogtreecommitdiffstats
path: root/dom/xslt/base
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-05-17 01:57:45 +0000
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-05-17 01:57:45 +0000
commitc72afc3c8c3f1df53d241c45dd21aa1b2a6c8e50 (patch)
tree8772589584d7c54eab9a65a2214774f0510b6731 /dom/xslt/base
parent354c6dceecdad5e58e2763e937ad5053e8b7d897 (diff)
downloadUXP-c72afc3c8c3f1df53d241c45dd21aa1b2a6c8e50.tar
UXP-c72afc3c8c3f1df53d241c45dd21aa1b2a6c8e50.tar.gz
UXP-c72afc3c8c3f1df53d241c45dd21aa1b2a6c8e50.tar.lz
UXP-c72afc3c8c3f1df53d241c45dd21aa1b2a6c8e50.tar.xz
UXP-c72afc3c8c3f1df53d241c45dd21aa1b2a6c8e50.zip
Add nullcheck.
This resolves #1088
Diffstat (limited to 'dom/xslt/base')
-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();