Fix crash in nsCodebasePrincipal::Equals when browser.registration.enable is set to true.

r=racham
This commit is contained in:
norris%netscape.com 2000-02-03 23:47:00 +00:00
parent bc8b3621c5
commit b5850888fc
2 changed files with 8 additions and 0 deletions

View File

@ -75,6 +75,10 @@ nsCertificatePrincipal::Equals(nsIPrincipal * other, PRBool * result)
*result = PR_TRUE;
return NS_OK;
}
if (!other) {
*result = PR_FALSE;
return NS_OK;
}
nsresult rv;
nsCOMPtr<nsICertificatePrincipal> otherCertificate =
do_QueryInterface(other, &rv);

View File

@ -72,6 +72,10 @@ nsCodebasePrincipal::Equals(nsIPrincipal *other, PRBool *result)
*result = PR_TRUE;
return NS_OK;
}
if (!other) {
*result = PR_FALSE;
return NS_OK;
}
nsCOMPtr<nsICodebasePrincipal> otherCodebase;
if (NS_FAILED(other->QueryInterface(
NS_GET_IID(nsICodebasePrincipal),