From ad1f6f3d45a5dadb578b3c213df3120213f74423 Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Tue, 23 Nov 2004 17:43:13 +0000 Subject: [PATCH] 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 --- mailnews/base/src/nsMsgAccountManager.cpp | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/mailnews/base/src/nsMsgAccountManager.cpp b/mailnews/base/src/nsMsgAccountManager.cpp index b6e38856a09..056a773021b 100644 --- a/mailnews/base/src/nsMsgAccountManager.cpp +++ b/mailnews/base/src/nsMsgAccountManager.cpp @@ -1900,22 +1900,6 @@ nsMsgAccountManager::InternalFindServer(const char* username, nsresult rv; nsCOMPtr 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; // "" acts as the wild card. @@ -1928,6 +1912,22 @@ nsMsgAccountManager::InternalFindServer(const char* username, serverInfo.type = type ? type : ""; 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; servers->EnumerateForwards(findServer, (void *)&serverInfo);