Add nullcheck. (uplift)
parent
abbb008c4e
commit
e53bfec76a
|
@ -45,6 +45,10 @@ void URIUtils::resolveHref(const nsAString& href, const nsAString& base,
|
||||||
void
|
void
|
||||||
URIUtils::ResetWithSource(nsIDocument *aNewDoc, nsINode *aSourceNode)
|
URIUtils::ResetWithSource(nsIDocument *aNewDoc, nsINode *aSourceNode)
|
||||||
{
|
{
|
||||||
|
if (!aSourceNode) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIDocument> sourceDoc = aSourceNode->OwnerDoc();
|
nsCOMPtr<nsIDocument> sourceDoc = aSourceNode->OwnerDoc();
|
||||||
nsIPrincipal* sourcePrincipal = sourceDoc->NodePrincipal();
|
nsIPrincipal* sourcePrincipal = sourceDoc->NodePrincipal();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue