defend against NULL GlobalServiceManager

This commit is contained in:
shaver%netscape.com 1999-08-11 04:08:44 +00:00
parent 99b9271de8
commit 38f90b75e4

View File

@ -460,7 +460,7 @@ nsServiceManager::ReleaseService(const nsCID& aClass, nsISupports* service,
nsIServiceManager* mgr;
nsresult rv = GetGlobalServiceManager(&mgr);
if (NS_FAILED(rv)) return rv;
return mgr->ReleaseService(aClass, service, shutdownListener);
return mgr ? mgr->ReleaseService(aClass, service, shutdownListener) : NS_OK;
}
nsresult