From bfbfd69ff5fc9b7723f1b579343677a0f02fea04 Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Sat, 10 Feb 2024 15:08:05 +0000 Subject: [PATCH] coap_threadsafe.c: Fix CID 1566426 --- src/coap_threadsafe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/coap_threadsafe.c b/src/coap_threadsafe.c index addb128c..42a1f115 100644 --- a/src/coap_threadsafe.c +++ b/src/coap_threadsafe.c @@ -416,6 +416,8 @@ coap_persist_startup(coap_context_t *context, void coap_persist_stop(coap_context_t *context) { + if (!context) + return; coap_lock_lock(context, return); coap_persist_stop_locked(context); coap_lock_unlock(context);