зеркало из https://github.com/mozilla/pjs.git
Bug #284699 --> add some null ptr protection to avoid a crash
sr=bienvenu
This commit is contained in:
Родитель
a25dbaca79
Коммит
dc0b1daba0
|
@ -362,21 +362,25 @@ nsSeamonkeyProfileMigrator::FillProfileDataFromSeamonkeyRegistry()
|
|||
nsCOMPtr<nsILocalFile> seamonkeyRegistry;
|
||||
#ifdef XP_WIN
|
||||
fileLocator->Get(NS_WIN_APPDATA_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(seamonkeyRegistry));
|
||||
NS_ENSURE_TRUE(seamonkeyRegistry, NS_ERROR_FAILURE);
|
||||
|
||||
seamonkeyRegistry->Append(NS_LITERAL_STRING("Mozilla"));
|
||||
seamonkeyRegistry->Append(NS_LITERAL_STRING("registry.dat"));
|
||||
#elif defined(XP_MACOSX)
|
||||
fileLocator->Get(NS_MAC_USER_LIB_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(seamonkeyRegistry));
|
||||
NS_ENSURE_TRUE(seamonkeyRegistry, NS_ERROR_FAILURE);
|
||||
|
||||
seamonkeyRegistry->Append(NS_LITERAL_STRING("Mozilla"));
|
||||
seamonkeyRegistry->Append(NS_LITERAL_STRING("Application Registry"));
|
||||
#elif defined(XP_UNIX)
|
||||
fileLocator->Get(NS_UNIX_HOME_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(seamonkeyRegistry));
|
||||
NS_ENSURE_TRUE(seamonkeyRegistry, NS_ERROR_FAILURE);
|
||||
|
||||
seamonkeyRegistry->Append(NS_LITERAL_STRING(".mozilla"));
|
||||
seamonkeyRegistry->Append(NS_LITERAL_STRING("appreg"));
|
||||
#elif defined(XP_OS2)
|
||||
fileLocator->Get(NS_OS2_HOME_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(seamonkeyRegistry));
|
||||
NS_ENSURE_TRUE(seamonkeyRegistry, NS_ERROR_FAILURE);
|
||||
|
||||
seamonkeyRegistry->Append(NS_LITERAL_STRING("Mozilla"));
|
||||
seamonkeyRegistry->Append(NS_LITERAL_STRING("registry.dat"));
|
||||
|
|
Загрузка…
Ссылка в новой задаче