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
This commit is contained in:
mflodman@webrtc.org 2012-01-30 13:21:26 +00:00
parent 5dad00be52
commit 7627843352

View File

@ -303,7 +303,16 @@ bool TbExternalTransport::ViEExternalTransportProcess()
// Take first packet in queue // Take first packet in queue
_crit.Enter(); _crit.Enter();
packet = _rtpPackets.front(); 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) if (timeToReceive > 0)
{ {
// No packets to receive yet // No packets to receive yet