mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed crash.
This commit is contained in:
parent
da03feaace
commit
84c28337d2
|
@ -61,8 +61,10 @@ JitterBuffer *create_queue(unsigned int capacity)
|
|||
static void clear_queue(JitterBuffer *q)
|
||||
{
|
||||
for (; q->bottom != q->top; ++q->bottom) {
|
||||
if (q->queue[q->bottom % q->size])
|
||||
if (q->queue[q->bottom % q->size]) {
|
||||
rtp_free_msg(NULL, q->queue[q->bottom % q->size]);
|
||||
q->queue[q->bottom % q->size] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user