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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user