Index: net/quic/quic_framer.cc |
diff --git a/net/quic/quic_framer.cc b/net/quic/quic_framer.cc |
index a04824a0684ab89a8bbeb94aa3e3990cc1f1bf6c..114f43f63e9a83c4ea7f1870a4b5a7acb578c05c 100644 |
--- a/net/quic/quic_framer.cc |
+++ b/net/quic/quic_framer.cc |
@@ -268,7 +268,8 @@ size_t QuicFramer::GetSerializedFrameLength( |
InFecGroup is_in_fec_group, |
QuicPacketNumberLength packet_number_length) { |
// Prevent a rare crash reported in b/19458523. |
- if (frame.stream_frame == nullptr) { |
+ if ((frame.type == STREAM_FRAME || frame.type == ACK_FRAME) && |
+ frame.stream_frame == nullptr) { |
LOG(DFATAL) << "Cannot compute the length of a null frame. " |
<< "type:" << frame.type << "free_bytes:" << free_bytes |
<< " first_frame:" << first_frame |
@@ -397,7 +398,7 @@ QuicPacket* QuicFramer::BuildDataPacket(const QuicPacketHeader& header, |
} |
break; |
case BLOCKED_FRAME: |
- if (!AppendBlockedFrame(*frame.blocked_frame, &writer)) { |
+ if (!AppendBlockedFrame(frame.blocked_frame, &writer)) { |
LOG(DFATAL) << "AppendBlockedFrame failed"; |
return nullptr; |
} |