Bug 1278439 - Adding missing prefs service null checks in netwerk/. r=valentin.
This commit is contained in:
7
netwerk/cache/nsCacheService.cpp
vendored
7
netwerk/cache/nsCacheService.cpp
vendored
@@ -412,9 +412,12 @@ nsCacheProfilePrefObserver::Observe(nsISupports * subject,
|
||||
// profile after change
|
||||
mHaveProfile = true;
|
||||
nsCOMPtr<nsIPrefBranch> branch = do_GetService(NS_PREFSERVICE_CONTRACTID);
|
||||
ReadPrefs(branch);
|
||||
if (!branch) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
(void)ReadPrefs(branch);
|
||||
nsCacheService::OnProfileChanged();
|
||||
|
||||
|
||||
} else if (!strcmp(NS_PREFBRANCH_PREFCHANGE_TOPIC_ID, topic)) {
|
||||
|
||||
// ignore pref changes until we're done switch profiles
|
||||
|
||||
Reference in New Issue
Block a user