mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-05 05:30:29 +00:00
fixing a potential crash if prefs do not exist. need to set rv. npodb
This commit is contained in:
parent
d6c2b9b884
commit
81f1a86c0d
@ -105,7 +105,7 @@ nsSpatialNavigationService::Observe(nsISupports *aSubject, const char *aTopic, c
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
windowWatcher->RegisterNotification(this);
|
||||
|
||||
nsCOMPtr<nsIPrefBranch2> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID);
|
||||
nsCOMPtr<nsIPrefBranch2> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
prefBranch->AddObserver("snav.", this, PR_FALSE);
|
||||
@ -186,7 +186,6 @@ nsSpatialNavigationService::Observe(nsISupports *aSubject, const char *aTopic, c
|
||||
|
||||
#define SpatialNavigationService_ContractID "@mozilla.org/spatialnavigation/service"
|
||||
|
||||
|
||||
static NS_METHOD SpatialNavigationServiceRegistration(nsIComponentManager *aCompMgr,
|
||||
nsIFile *aPath,
|
||||
const char *registryLocation,
|
||||
|
Loading…
x
Reference in New Issue
Block a user