Fix segfault when ps not found

pull/1295/head
Stefan Mititelu 4 years ago
parent 77b5e0b6bd
commit 96c05d3fcf

@ -234,10 +234,14 @@ void statistics_update_oneway(struct call* c) {
}
if (found) { break; }
}
if (!found)
ps = NULL;
struct sink_handler *sh = g_queue_peek_head(&ps->rtp_sinks);
ps2 = sh ? sh->sink : NULL;
if (ps) {
struct sink_handler *sh = g_queue_peek_head(&ps->rtp_sinks);
ps2 = sh ? sh->sink : NULL;
}
if (ps && ps2 && atomic64_get(&ps2->stats.packets)==0) {
if (atomic64_get(&ps->stats.packets)!=0 && IS_OWN_CALL(c)){

Loading…
Cancel
Save