summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-05-17 01:57:45 +0000
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-05-17 02:00:06 +0000
commit7258eeb1f5c1fdc43e6351cead4a039343c47f1a (patch)
tree2e4866083490175259e5905185ad4a05eceadbd1
parentdabd43c914c826c8cb66b6b224c5581256cb6f05 (diff)
downloadUXP-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.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();