diff --git a/lib/core-net/sorted-usec-list.c b/lib/core-net/sorted-usec-list.c index e9b9c1f6b..d9af0f118 100644 --- a/lib/core-net/sorted-usec-list.c +++ b/lib/core-net/sorted-usec-list.c @@ -146,6 +146,12 @@ __lws_sul_service_ripe(lws_dll2_owner_t *own, int own_len, lws_usec_t usnow) /* his moment has come... remove him from his owning list */ + if (!hit->cb) { + lwsl_err("%s: sul with NULL callback (did not cancel on destory?)\n", __func__); + + return 0; + } + lws_dll2_remove(&hit->list); hit->us = 0;