From 7627843352a923e3662cc6aab9e056ed66fd9d40 Mon Sep 17 00:00:00 2001 From: "mflodman@webrtc.org" Date: Mon, 30 Jan 2012 13:21:26 +0000 Subject: [PATCH] Added NULL check in external transport test code. BUG=C-10246 Review URL: https://webrtc-codereview.appspot.com/367022 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1570 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../test/auto_test/source/tb_external_transport.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/video_engine/test/auto_test/source/tb_external_transport.cc b/src/video_engine/test/auto_test/source/tb_external_transport.cc index ec1a5617a..1e5375ba7 100644 --- a/src/video_engine/test/auto_test/source/tb_external_transport.cc +++ b/src/video_engine/test/auto_test/source/tb_external_transport.cc @@ -303,7 +303,16 @@ bool TbExternalTransport::ViEExternalTransportProcess() // Take first packet in queue _crit.Enter(); packet = _rtpPackets.front(); - WebRtc_Word64 timeToReceive = packet->receiveTime - NowMs(); + WebRtc_Word64 timeToReceive = 0; + if (packet) + { + timeToReceive = packet->receiveTime - NowMs(); + } + else + { + // There should never be any empty packets in the list. + assert(false); + } if (timeToReceive > 0) { // No packets to receive yet