From a687afbef80db576f4b927a26611edda342b323b Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Wed, 21 Mar 2001 03:39:53 +0000 Subject: [PATCH] other part of fix for #72642. defensive programming. sr=bienvenu. --- mailnews/local/src/nsMailboxProtocol.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mailnews/local/src/nsMailboxProtocol.cpp b/mailnews/local/src/nsMailboxProtocol.cpp index 7adb02d09dfd..24af73416378 100644 --- a/mailnews/local/src/nsMailboxProtocol.cpp +++ b/mailnews/local/src/nsMailboxProtocol.cpp @@ -219,8 +219,11 @@ PRInt32 nsMailboxProtocol::DoneReadingMessage() nsCOMPtr msgHdr; rv = m_runningUrl->GetMessageHeader(getter_AddRefs(msgHdr)); - if (NS_SUCCEEDED(rv)) + if (NS_SUCCEEDED(rv)) { + NS_ASSERTION(msgHdr, "no msg hdr!"); + if (!msgHdr) return NS_ERROR_UNEXPECTED; msgHdr->MarkRead(PR_TRUE); + } } return rv;