Bug 270797 ###!!! ASSERTION: null data pointer: 'Not Reached', file r:\mozilla\xpcom\string\src\nsTSubstring.cpp, line 599

patch by bugzilla@mcsmurf.de r=neil sr=bienvenu
This commit is contained in:
timeless%mozdev.org 2004-11-23 17:43:13 +00:00
Родитель e005d2fed7
Коммит ad1f6f3d45
1 изменённых файлов: 16 добавлений и 16 удалений

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

@ -1900,22 +1900,6 @@ nsMsgAccountManager::InternalFindServer(const char* username,
nsresult rv; nsresult rv;
nsCOMPtr<nsISupportsArray> servers; nsCOMPtr<nsISupportsArray> servers;
// If 'useRealSetting' is set then we want to scan all existing accounts
// to make sure there's no duplicate including those whose host and/or
// user names have been changed.
if (!useRealSetting &&
(m_lastFindServerHostName.Equals(hostname)) &&
(m_lastFindServerUserName.Equals(username)) &&
(m_lastFindServerType.Equals(type)) &&
m_lastFindServerResult)
{
NS_ADDREF(*aResult = m_lastFindServerResult);
return NS_OK;
}
rv = GetAllServers(getter_AddRefs(servers));
if (NS_FAILED(rv)) return rv;
findServerEntry serverInfo; findServerEntry serverInfo;
// "" acts as the wild card. // "" acts as the wild card.
@ -1928,6 +1912,22 @@ nsMsgAccountManager::InternalFindServer(const char* username,
serverInfo.type = type ? type : ""; serverInfo.type = type ? type : "";
serverInfo.useRealSetting = useRealSetting; serverInfo.useRealSetting = useRealSetting;
// If 'useRealSetting' is set then we want to scan all existing accounts
// to make sure there's no duplicate including those whose host and/or
// user names have been changed.
if (!useRealSetting &&
(m_lastFindServerHostName.Equals(serverInfo.hostname)) &&
(m_lastFindServerUserName.Equals(serverInfo.username)) &&
(m_lastFindServerType.Equals(serverInfo.type)) &&
m_lastFindServerResult)
{
NS_ADDREF(*aResult = m_lastFindServerResult);
return NS_OK;
}
rv = GetAllServers(getter_AddRefs(servers));
if (NS_FAILED(rv)) return rv;
serverInfo.server = *aResult = nsnull; serverInfo.server = *aResult = nsnull;
servers->EnumerateForwards(findServer, (void *)&serverInfo); servers->EnumerateForwards(findServer, (void *)&serverInfo);