Index: net/quic/test_tools/quic_connection_peer.cc |
diff --git a/net/quic/test_tools/quic_connection_peer.cc b/net/quic/test_tools/quic_connection_peer.cc |
index 43c43745e5694a20f3529bc44d60ebb09441a7a4..15653ceabe15938b73678a1ad13f5cfd936f5527 100644 |
--- a/net/quic/test_tools/quic_connection_peer.cc |
+++ b/net/quic/test_tools/quic_connection_peer.cc |
@@ -219,7 +219,11 @@ void QuicConnectionPeer::CloseConnection(QuicConnection* connection) { |
// static |
QuicEncryptedPacket* QuicConnectionPeer::GetConnectionClosePacket( |
QuicConnection* connection) { |
- return connection->connection_close_packet_.get(); |
+ if (connection->termination_packets_ == nullptr || |
+ connection->termination_packets_->empty()) { |
+ return nullptr; |
+ } |
+ return (*connection->termination_packets_)[0]; |
} |
// static |