add error check that we can actually get the hdr from the db

git-svn-id: svn://10.0.0.236/trunk@23965 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bienvenu%netscape.com
1999-03-12 20:16:23 +00:00
parent b3213aed32
commit 781f4a7ec1

View File

@@ -954,7 +954,7 @@ NS_IMETHODIMP nsMsgLocalMailFolder::OnKeyAdded(nsMsgKey aKeyChanged, int32 aFlag
mMailDatabase->GetMsgHdrForKey(aKeyChanged, &pMessage);
nsString author, subject;
nsISupports *msgSupports;
if(NS_SUCCEEDED(pMessage->QueryInterface(kISupportsIID, (void**)&msgSupports)))
if(pMessage && NS_SUCCEEDED(pMessage->QueryInterface(kISupportsIID, (void**)&msgSupports)))
{
for(int i = 0; i < mListeners->Count(); i++)
{