From e29b29c0bad7b2ec5cff0a9033bbca8e9186b15b Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Thu, 24 Jun 2004 23:49:08 +0000 Subject: [PATCH] Bug 248458 Crash [@ nsJSIID::Equals] for null other r=dbradley sr=shaver --- js/src/xpconnect/src/xpcjsid.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/src/xpconnect/src/xpcjsid.cpp b/js/src/xpconnect/src/xpcjsid.cpp index 6f290b946d11..3272d7ac7075 100644 --- a/js/src/xpconnect/src/xpcjsid.cpp +++ b/js/src/xpconnect/src/xpcjsid.cpp @@ -433,6 +433,14 @@ NS_IMETHODIMP nsJSIID::GetValid(PRBool *aValid) NS_IMETHODIMP nsJSIID::Equals(nsIJSID *other, PRBool *_retval) { + if(!_retval) + return NS_ERROR_NULL_POINTER; + + *_retval = PR_FALSE; + + if(!other) + return NS_OK; + nsID* otherID; if(NS_SUCCEEDED(other->GetId(&otherID))) {