diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-05-17 01:57:45 +0000 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-05-17 01:57:45 +0000 |
commit | c72afc3c8c3f1df53d241c45dd21aa1b2a6c8e50 (patch) | |
tree | 8772589584d7c54eab9a65a2214774f0510b6731 /dom/xslt/base | |
parent | 354c6dceecdad5e58e2763e937ad5053e8b7d897 (diff) | |
download | uxp-c72afc3c8c3f1df53d241c45dd21aa1b2a6c8e50.tar.gz |
Add nullcheck.
This resolves #1088
Diffstat (limited to 'dom/xslt/base')
-rw-r--r-- | dom/xslt/base/txURIUtils.cpp | 4 |
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(); |