Skip to content

Commit b05db66

Browse files
committed
Make sure ila_c->sock->rh has been initialized.
1 parent 2e3580b commit b05db66

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

modules/ice_lite/rtpp_ice_lite.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ rtpp_ice_lite_worker(const struct rtpp_wthrdata *wp)
253253
struct sa raddr = {0};
254254
rtpp2re_sa(&raddr, sstosa(&pkt->raddr));
255255
ila_c->sock->strmp_in = wip->strmp_in;
256+
if (ila_c->sock->rh == NULL)
257+
goto out;
256258
ila_c->sock->rh(&raddr, mb, ila_c->sock->rh_arg);
257259
bool completed = iscompleted(ila_c->icem);
258260
if (!ila_iscompleted(ila_c) && completed) {
@@ -261,6 +263,7 @@ rtpp_ice_lite_worker(const struct rtpp_wthrdata *wp)
261263
CALL_SMETHOD(ila_c->sock->strmp_in, latch, pkt);
262264
atomic_store_explicit(&ila_c->completed, true, memory_order_relaxed);
263265
}
266+
out:
264267
pthread_mutex_unlock(&ila_c->state_lock);
265268
RTPP_OBJ_DECREF(pkt);
266269
RTPP_OBJ_DECREF(wi);

0 commit comments

Comments
 (0)