Bug 1396307 - Add null check in nsHttpChannel::OnAuthAvailable r=michal draft
authorValentin Gosu <valentin.gosu@gmail.com>
Thu, 14 Sep 2017 21:50:15 +0200
changeset 664992 4ae01e3889b5e1cd3708e9a1273b7e0eb79aca51
parent 664991 21ec1409444b202fcb73aee8b8d04475c5179679
child 665023 6448c3a429612edb0923a44c3a199c96bd3643e7
child 665025 b0dd35d8dc246edef20c4d6cf220013131366b1e
push id79893
push uservalentin.gosu@gmail.com
push dateThu, 14 Sep 2017 19:51:11 +0000
reviewersmichal
bugs1396307
milestone57.0a1
Bug 1396307 - Add null check in nsHttpChannel::OnAuthAvailable r=michal MozReview-Commit-ID: L9zaroxJ72i
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -5858,17 +5858,19 @@ NS_IMETHODIMP nsHttpChannel::OnAuthAvail
     LOG(("nsHttpChannel::OnAuthAvailable [this=%p]", this));
 
     // setting mAuthRetryPending flag and resuming the transaction
     // triggers process of throwing away the unauthenticated data already
     // coming from the network
     mAuthRetryPending = true;
     mProxyAuthPending = false;
     LOG(("Resuming the transaction, we got credentials from user"));
-    mTransactionPump->Resume();
+    if (mTransactionPump) {
+        mTransactionPump->Resume();
+    }
 
     return NS_OK;
 }
 
 NS_IMETHODIMP nsHttpChannel::OnAuthCancelled(bool userCancel)
 {
     LOG(("nsHttpChannel::OnAuthCancelled [this=%p]", this));