Fix crash with an empty buffer

This commit is contained in:
Justin Maggard 2014-02-05 17:38:14 -08:00
parent f9a76aeb1a
commit 5c8b28cda4

View File

@ -3286,12 +3286,12 @@ raop_v2_resend_range(struct raop_session *rs, uint16_t seqnum, uint16_t len)
if (pktbuf == pktbuf_head)
{
while (seqnum != pktbuf->seqnum)
while (pktbuf && seqnum != pktbuf->seqnum)
pktbuf = pktbuf->next;
}
else
{
while (seqnum != pktbuf->seqnum)
while (pktbuf && seqnum != pktbuf->seqnum)
pktbuf = pktbuf->prev;
}