diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-05-17 01:57:45 +0000 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-05-17 02:00:06 +0000 |
commit | 7258eeb1f5c1fdc43e6351cead4a039343c47f1a (patch) | |
tree | 2e4866083490175259e5905185ad4a05eceadbd1 | |
parent | dabd43c914c826c8cb66b6b224c5581256cb6f05 (diff) | |
download | UXP-7258eeb1f5c1fdc43e6351cead4a039343c47f1a.tar UXP-7258eeb1f5c1fdc43e6351cead4a039343c47f1a.tar.gz UXP-7258eeb1f5c1fdc43e6351cead4a039343c47f1a.tar.lz UXP-7258eeb1f5c1fdc43e6351cead4a039343c47f1a.tar.xz UXP-7258eeb1f5c1fdc43e6351cead4a039343c47f1a.zip |
Add nullcheck. (uplift)
This resolves #1088
-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 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(); |