mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 08:13:35 +00:00
Bug 101294 - make sure that nsPref is never unhappy at construction time, r=caillon, sr=dveditz
This commit is contained in:
parent
649763f2c3
commit
b46bf85337
@ -709,10 +709,13 @@ NS_IMETHODIMP nsPref::SecurityClearUserPref(const char *pref_name)
|
||||
nsPref* nsPref::GetInstance()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
if (gInstance)
|
||||
return gInstance;
|
||||
NS_NEWXPCOM(gInstance, nsPref);
|
||||
if (!gInstance)
|
||||
{
|
||||
NS_NEWXPCOM(gInstance, nsPref);
|
||||
}
|
||||
return nsnull;
|
||||
if (!gInstance->mPrefService)
|
||||
NS_RELEASE(gInstance);
|
||||
return gInstance;
|
||||
} // nsPref::GetInstance
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user