Bug 1351340 - Check null pointer before using. r=bagder, a=ritu
authorLiang-Heng Chen <xeonchen@gmail.com>
Sat, 01 Apr 2017 10:23:03 +0800
changeset 578467 047f19a1b9a096fb12f2c28575e6603ad51f7b95
parent 578466 3caa4973f29431dc73a4c7b3c93a05f6678bd11f
child 578468 f076a30f6c291b7dfcda20a230ed910f373a3515
push id58939
push userbmo:cku@mozilla.com
push dateTue, 16 May 2017 04:17:59 +0000
reviewersbagder, ritu
bugs1351340
milestone52.1.2
Bug 1351340 - Check null pointer before using. r=bagder, a=ritu MozReview-Commit-ID: LJ0FtjZTKq3
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -2299,17 +2299,17 @@ nsHttpChannel::ContinueProcessResponse3(
             // Store response in the offline cache
             InitOfflineCacheEntry();
             CloseOfflineCacheEntry();
         }
         return NS_OK;
     }
 
     LOG(("ContinueProcessResponse3 got failure result [rv=%x]\n", rv));
-    if (mTransaction->ProxyConnectFailed()) {
+    if (mTransaction && mTransaction->ProxyConnectFailed()) {
         return ProcessFailedProxyConnect(mRedirectType);
     }
     return ProcessNormal();
 }
 
 nsresult
 nsHttpChannel::ProcessNormal()
 {