Bug 1580187 - Add null check to avoid crash in nsImapService::NewChannel().

Tag #1273
This commit is contained in:
Matt A. Tobin 2019-11-11 01:53:00 -05:00 committed by Roy Tam
commit 338383f722

View file

@ -2734,7 +2734,7 @@ NS_IMETHODIMP nsImapService::NewChannel2(nsIURI *aURI,
nsCString fullFolderName;
if (parent)
fullFolderName = folderName;
if (!parent && !folderName.IsEmpty()) // check if this folder is another user's folder
if (!parent && !folderName.IsEmpty() && imapRoot) // Check if this folder is another user's folder.
{
fullFolderName = nsIMAPNamespaceList::GenerateFullFolderNameWithDefaultNamespace(serverKey.get(),
folderName.get(),