Index: net/quic/quic_packet_generator.cc |
diff --git a/net/quic/quic_packet_generator.cc b/net/quic/quic_packet_generator.cc |
index 49cdc7f6cad43c427b7a70d60e65a2c6653a5e96..cc3a79331a1af98a0be4c85ed3b00aeb69398846 100644 |
--- a/net/quic/quic_packet_generator.cc |
+++ b/net/quic/quic_packet_generator.cc |
@@ -457,7 +457,12 @@ void QuicPacketGenerator::SerializeAndSendPacket() { |
char buffer[kMaxPacketSize]; |
SerializedPacket serialized_packet = |
packet_creator_.SerializePacket(buffer, kMaxPacketSize); |
- DCHECK(serialized_packet.packet); |
+ if (serialized_packet.packet == nullptr) { |
+ LOG(DFATAL) << "Failed to SerializePacket. fec_policy:" << fec_send_policy_ |
+ << " should_fec_protect_:" << should_fec_protect_; |
+ delegate_->CloseConnection(QUIC_FAILED_TO_SERIALIZE_PACKET, false); |
+ return; |
+ } |
// There may be AckNotifiers interested in this packet. |
serialized_packet.notifiers.swap(ack_notifiers_); |