зеркало из https://github.com/mozilla/pjs.git
Initialize a variable to null. Assert if we are unable to create an instance of the prefs service.
This commit is contained in:
Родитель
de6b2b6673
Коммит
adfd87b89a
|
@ -65,7 +65,7 @@ void nsMsgIdentity::InitializeIdentity()
|
|||
#define PREF_LENGTH 128
|
||||
char prefValue[PREF_LENGTH];
|
||||
PRInt32 prefLength = PREF_LENGTH;
|
||||
nsIPref* prefs;
|
||||
nsIPref* prefs = nsnull;
|
||||
nsresult rv;
|
||||
rv = nsServiceManager::GetService(kPrefCID, kIPrefIID, (nsISupports**)&prefs);
|
||||
if (prefs && NS_SUCCEEDED(rv))
|
||||
|
@ -124,6 +124,8 @@ void nsMsgIdentity::InitializeIdentity()
|
|||
|
||||
nsServiceManager::ReleaseService(kPrefCID, prefs);
|
||||
}
|
||||
else
|
||||
NS_ASSERTION(0, "unable to create the prefs service!!");
|
||||
}
|
||||
|
||||
nsresult nsMsgIdentity::GetPopName(const char ** aUserName)
|
||||
|
|
Загрузка…
Ссылка в новой задаче