From afa3e0b204f9975de060fcbeee4320204670af05 Mon Sep 17 00:00:00 2001 From: "jband%netscape.com" Date: Thu, 20 Sep 2001 00:51:38 +0000 Subject: [PATCH] fix bug 100222. Fix crash by only releasing other objects in xpcwrappedjs dtor if xpconnect has not yet shutdown. r=dbradley sr=jst. --- js/src/xpconnect/src/xpcwrappedjs.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/src/xpconnect/src/xpcwrappedjs.cpp b/js/src/xpconnect/src/xpcwrappedjs.cpp index f6e6d8cabf41..fd8de90e8169 100644 --- a/js/src/xpconnect/src/xpcwrappedjs.cpp +++ b/js/src/xpconnect/src/xpcwrappedjs.cpp @@ -365,8 +365,11 @@ nsXPCWrappedJS::~nsXPCWrappedJS() } } - NS_IF_RELEASE(mClass); - NS_IF_RELEASE(mOuter); + if(IsValid()) + { + NS_IF_RELEASE(mClass); + NS_IF_RELEASE(mOuter); + } } nsXPCWrappedJS*