Bug 1385375 - Fix crash in nsPop3Protocol::InitializeInternal() - take 2. r=rkent
authorJorg K <jorgk@jorgk.com>
Sun, 01 Oct 2017 00:05:00 +0200
changeset 29072 94a4ec7dff4b517377987f5ebf4e2b690fbc4e97
parent 29071 079662f3683788017ec3c4f605863681c5e2d0e2
child 29073 9dafe6d1a064e8697c7f3d080ceb149453258ff4
push id2068
push userclokep@gmail.com
push dateMon, 13 Nov 2017 19:02:14 +0000
treeherdercomm-beta@9c7e7ce8672b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrkent
bugs1385375
Bug 1385375 - Fix crash in nsPop3Protocol::InitializeInternal() - take 2. r=rkent
mailnews/local/src/nsPop3Protocol.cpp
--- a/mailnews/local/src/nsPop3Protocol.cpp
+++ b/mailnews/local/src/nsPop3Protocol.cpp
@@ -515,16 +515,18 @@ nsPop3Protocol::OnProxyAvailable(nsICanc
 }
 
 nsresult nsPop3Protocol::InitializeInternal(nsIProxyInfo* aProxyInfo)
 {
   nsresult rv;
 
   m_proxyRequest = nullptr;
 
+  NS_ENSURE_TRUE(m_url, NS_ERROR_NOT_INITIALIZED);
+
   // extract out message feedback if there is any.
   nsCOMPtr<nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(m_url);
   if (mailnewsUrl)
   {
     nsCOMPtr<nsIMsgIncomingServer> server;
     mailnewsUrl->GetServer(getter_AddRefs(server));
     NS_ENSURE_TRUE(server, NS_MSG_INVALID_OR_MISSING_SERVER);