From 5724b43f60e47a3f6dd1f235fbfc7060abfd85e0 Mon Sep 17 00:00:00 2001 From: "dbaron%dbaron.org" Date: Fri, 23 Dec 2005 18:54:26 +0000 Subject: [PATCH] Do not call PreserveWrapper with a null pointer. b=319642 r+sr=bzbarsky --- dom/src/base/nsDOMClassInfo.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dom/src/base/nsDOMClassInfo.cpp b/dom/src/base/nsDOMClassInfo.cpp index 4b3548f3e878..8d22d6267be4 100644 --- a/dom/src/base/nsDOMClassInfo.cpp +++ b/dom/src/base/nsDOMClassInfo.cpp @@ -4969,6 +4969,9 @@ nsDOMClassInfo::PreserveNodeWrapper(nsIXPConnectWrappedNative *aWrapper) { nsCOMPtr participant = do_QueryInterface(aWrapper->Native()); + if (!participant) + // nsJSContext::PreserveWrapper needs us to null-check + return NS_OK; return nsDOMClassInfo::PreserveWrapper(aWrapper, IdentityKeyToWrapperFunc, participant);