mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
defend against NULL GlobalServiceManager
This commit is contained in:
parent
99b9271de8
commit
38f90b75e4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user