Index: net/quic/quic_connection.cc |
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc |
index 79f0d5d25ecda3306082fc2ba7ce71c50e2f3ea0..c0d064aa3a1a13c9bb51981f0de9396eda9a3fd5 100644 |
--- a/net/quic/quic_connection.cc |
+++ b/net/quic/quic_connection.cc |
@@ -2073,7 +2073,11 @@ void QuicConnection::CloseConnection(QuicErrorCode error, bool from_peer) { |
} |
connected_ = false; |
DCHECK(visitor_ != nullptr); |
- visitor_->OnConnectionClosed(error, from_peer); |
+ // TODO(rtenneti): crbug.com/546668. A temporary fix. Added a check for null |
+ // |visitor_| to fix crash bug. Delete it after fix is merged. |
+ if (visitor_) { |
+ visitor_->OnConnectionClosed(error, from_peer); |
+ } |
Ryan Hamilton
2016/02/01 03:39:31
Would it be worth adding an:
} else {
UMA_HISTO
ramant (doing other things)
2016/02/01 17:50:27
Good idea.
Done.
|
if (debug_visitor_ != nullptr) { |
debug_visitor_->OnConnectionClosed(error, from_peer); |
} |