Bug 694915 - crash nsNntpService::MessageURIToMsgHdr. r+a=Standard8
authorDavid Bienvenu <dbienvenu@mozilla.com>
Tue, 01 Nov 2011 19:25:25 +0000
changeset 8972 f1e64bc51f7bc2ceac8ffc03287eadecd97d9024
parent 8971 686a094bd8adf92f815f781f49090d28914d3051
child 8977 29722e076d509d1638e28d05125d9b2728c574e9
push idunknown
push userunknown
push dateunknown
bugs694915
Bug 694915 - crash nsNntpService::MessageURIToMsgHdr. r+a=Standard8
mailnews/news/src/nsNntpService.cpp
--- a/mailnews/news/src/nsNntpService.cpp
+++ b/mailnews/news/src/nsNntpService.cpp
@@ -1743,16 +1743,18 @@ nsNntpService::MessageURIToMsgHdr(const 
   NS_ENSURE_ARG_POINTER(_retval);
   nsresult rv = NS_OK;
 
   nsCOMPtr <nsIMsgFolder> folder;
   nsMsgKey msgKey;
 
   rv = DecomposeNewsMessageURI(uri, getter_AddRefs(folder), &msgKey);
   NS_ENSURE_SUCCESS(rv,rv);
+  if (!folder)
+    return NS_ERROR_NULL_POINTER;
 
   rv = folder->GetMessageHeader(msgKey, _retval);
   NS_ENSURE_SUCCESS(rv,rv);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsNntpService::DownloadNewsgroupsForOffline(nsIMsgWindow *aMsgWindow, nsIUrlListener *aListener)