summaryrefslogtreecommitdiff
path: root/dom/xslt
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
parent354c6dceecdad5e58e2763e937ad5053e8b7d897 (diff)
downloaduxp-c72afc3c8c3f1df53d241c45dd21aa1b2a6c8e50.tar.gz
Add nullcheck.
This resolves #1088
Diffstat (limited to 'dom/xslt')
-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 3f3556f801..bce2f8d0f3 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();