minor code clean up, guard against crasher by checking rv.

rs=bienvenu
This commit is contained in:
scott%scott-macgregor.org 2004-04-18 19:18:17 +00:00
Родитель dd399cfbd0
Коммит d784e4980d
1 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -461,8 +461,7 @@ nsMsgAccountManager::GetIncomingServer(const char* key,
do_QueryInterface((nsISupports*)m_incomingServers.Get(&hashKey), &rv);
if (NS_SUCCEEDED(rv)) {
*_retval = server;
NS_ADDREF(*_retval);
NS_ADDREF(*_retval = server);
return NS_OK;
}
@ -546,11 +545,10 @@ nsMsgAccountManager::createKeyedServer(const char* key,
// waiting on root folders
nsCOMPtr<nsIMsgFolder> rootFolder;
rv = server->GetRootFolder(getter_AddRefs(rootFolder));
NS_ENSURE_SUCCESS(rv, rv);
mFolderListeners->EnumerateForwards(addListenerToFolder,
(void *)(nsIMsgFolder*)rootFolder);
*aServer = server;
NS_ADDREF(*aServer);
NS_ADDREF(*aServer = server);
return NS_OK;
}