From 4d23fb13899364bdb2064f1bd229575736078e46 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 23 Oct 2019 12:04:32 +0100 Subject: [PATCH] ws: handle no ws object at sul_ping callback --- lib/roles/ws/ops-ws.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/roles/ws/ops-ws.c b/lib/roles/ws/ops-ws.c index ef0d8a6af..b95938412 100644 --- a/lib/roles/ws/ops-ws.c +++ b/lib/roles/ws/ops-ws.c @@ -841,6 +841,9 @@ lws_sul_wsping_cb(lws_sorted_usec_list_t *sul) { struct lws *wsi = lws_container_of(sul, struct lws, sul_ping); + if (!wsi->ws) + return; + /* * The sul_ping timer came up... either it's time to send a PING * (!wsi->ws->send_check_ping), or we didn't get the PONG in time