fix potential top crash opening db's, r+a=standard8, bug 748432
authorDavid Bienvenu <bienvenu@nventure.com>
Wed, 25 Apr 2012 09:11:23 -0700
changeset 22486 df893565cbac61fc8bde6872b50b7a2728b4ce3c
parent 22480 37620e34f3a4b5a40a78817fc6d953b02fa9398c
child 22487 dc7679cbae9b86b9d03e749e6bc7653e89bdb17d
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs748432
fix potential top crash opening db's, r+a=standard8, bug 748432
mailnews/db/msgdb/src/nsMsgDatabase.cpp
--- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp
@@ -125,16 +125,17 @@ NS_IMETHODIMP nsMsgDBService::OpenFolder
   nsCOMPtr<nsIMsgIncomingServer> incomingServer;
   nsCOMPtr <nsILocalFile> summaryFilePath;
 
   nsresult rv = aFolder->GetServer(getter_AddRefs(incomingServer));
   NS_ENSURE_SUCCESS(rv, rv);
   rv = aFolder->GetMsgStore(getter_AddRefs(msgStore));
   NS_ENSURE_SUCCESS(rv, rv);
   rv = msgStore->GetSummaryFile(aFolder, getter_AddRefs(summaryFilePath));
+  NS_ENSURE_SUCCESS(rv, rv);
 
   nsMsgDatabase *cacheDB = nsMsgDatabase::FindInCache(summaryFilePath);
   if (cacheDB)
   {
     // this db could have ended up in the folder cache w/o an m_folder pointer via
     // OpenMailDBFromFile. If so, take this chance to fix the folder.
     if (!cacheDB->m_folder)
       cacheDB->m_folder = aFolder;