diff --git a/mailnews/base/src/nsMsgFolderCache.cpp b/mailnews/base/src/nsMsgFolderCache.cpp index 9a57f245933..b3674f177b9 100644 --- a/mailnews/base/src/nsMsgFolderCache.cpp +++ b/mailnews/base/src/nsMsgFolderCache.cpp @@ -383,7 +383,11 @@ NS_IMETHODIMP nsMsgFolderCache::GetCacheElement(const char *pathKey, PRBool crea if (!result || !pathKey) return NS_ERROR_NULL_POINTER; - + + if (nsCRT::strlen(pathKey) == 0) { + return NS_ERROR_FAILURE; + } + nsCStringKey hashKey(pathKey); *result = (nsIMsgFolderCacheElement *) m_cacheElements->Get(&hashKey);