Bug 454558 Null check missing in nsGNOMEShellService::GetShouldCheckDefaultBrowser and SetShouldCheckDefaultBrowser, r+sr=roc

This commit is contained in:
Ginn Chen 2008-09-28 21:09:09 +08:00
parent fe93fbe086
commit bfd9de50bb

View File

@ -328,7 +328,8 @@ nsGNOMEShellService::GetShouldCheckDefaultBrowser(PRBool* aResult)
if (pserve)
pserve->GetBranch("", getter_AddRefs(prefs));
prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult);
if (prefs)
prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult);
return NS_OK;
}
@ -341,7 +342,8 @@ nsGNOMEShellService::SetShouldCheckDefaultBrowser(PRBool aShouldCheck)
if (pserve)
pserve->GetBranch("", getter_AddRefs(prefs));
prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck);
if (prefs)
prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck);
return NS_OK;
}