From 8c846904528ff9bb7e2cfe973dbf593e55ca13fd Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Sat, 25 Sep 1999 20:11:33 +0000 Subject: [PATCH] Tidy up --- xpcom/build/nsXPComInit.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xpcom/build/nsXPComInit.cpp b/xpcom/build/nsXPComInit.cpp index 7962ceec02f3..6692e14036ba 100644 --- a/xpcom/build/nsXPComInit.cpp +++ b/xpcom/build/nsXPComInit.cpp @@ -436,10 +436,11 @@ nsresult NS_COM NS_ShutdownXPCOM(nsIServiceManager* servMgr) { nsrefcnt cnt; - // We may have AddRef'd for the caller of NS_InitXPCOM, so release it - // here again: + // We may have AddRef'd for the caller of NS_InitXPCOM, so release it + // here again: + NS_IF_RELEASE(servMgr); - NS_RELEASE2(nsServiceManager::mGlobalServiceManager, cnt); + NS_RELEASE2(nsServiceManager::mGlobalServiceManager, cnt); NS_ASSERTION(cnt == 0, "Service Manager being held past XPCOM shutdown."); // Finally, release the component manager last because it unloads the @@ -453,4 +454,4 @@ nsresult NS_COM NS_ShutdownXPCOM(nsIServiceManager* servMgr) return NS_OK; } -//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////