return null identity on null or empty key

no bug
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@51214 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alecf%netscape.com
1999-10-19 23:37:54 +00:00
parent c097cd276c
commit 959275c4ac

View File

@@ -433,9 +433,13 @@ nsMsgAccountManager::GetIdentity(const char* key,
nsIMsgIdentity **_retval)
{
if (!_retval) return NS_ERROR_NULL_POINTER;
// null or empty key does not return an identity!
if (!key || !key[0]) {
*_retval = nsnull;
return NS_OK;
}
nsresult rv;
// check for the identity in the hash table
nsStringKey hashKey(key);
nsISupports *idsupports = (nsISupports*)m_identities.Get(&hashKey);