mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-19 09:30:44 +00:00
Bug 1278439 - Adding a missing prefs service null check in chrome/. r=froydnj.
--HG-- extra : rebase_source : e1a3b142818311e74c566da49534727189075b9e
This commit is contained in:
parent
303d9bf656
commit
2715b3a3ef
@ -123,15 +123,17 @@ nsChromeRegistryChrome::Init()
|
||||
nsCOMPtr<nsIPrefService> prefserv (do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
nsCOMPtr<nsIPrefBranch> prefs;
|
||||
|
||||
if (safeMode)
|
||||
prefserv->GetDefaultBranch(nullptr, getter_AddRefs(prefs));
|
||||
else
|
||||
prefs = do_QueryInterface(prefserv);
|
||||
if (prefserv) {
|
||||
if (safeMode) {
|
||||
prefserv->GetDefaultBranch(nullptr, getter_AddRefs(prefs));
|
||||
} else {
|
||||
prefs = do_QueryInterface(prefserv);
|
||||
}
|
||||
}
|
||||
|
||||
if (!prefs) {
|
||||
NS_WARNING("Could not get pref service!");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
nsXPIDLCString provider;
|
||||
rv = prefs->GetCharPref(SELECTED_SKIN_PREF, getter_Copies(provider));
|
||||
if (NS_SUCCEEDED(rv))
|
||||
|
Loading…
x
Reference in New Issue
Block a user