Add nullcheck. (uplift)

master
Fedor 2019-06-12 13:43:25 +03:00
parent abbb008c4e
commit e53bfec76a
1 changed files with 4 additions and 0 deletions

View File

@ -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();