Bug 694915 - crash nsNntpService::MessageURIToMsgHdr. r+a=Standard8
authorDavid Bienvenu <dbienvenu@mozilla.com>
Tue, 01 Nov 2011 19:25:25 +0000
changeset 11038 947fcdab47921b3b7ffb2305463049382897defa
parent 11037 da86e80a5e3b4ca47214f732908e3d06f8fe4f88
child 11039 aee8961b80555bab45a29d74a4373b11723ceae1
push id6
push userbienvenu@nventure.com
push dateWed, 16 May 2012 22:24:51 +0000
treeherdertry-comm-central@ac395aea3008 [default view] [failures only]
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)