diff --git a/src/W800_SDK_v1.00.10/src/bt/blehost/porting/w800/src/npl_os_freertos.c b/src/W800_SDK_v1.00.10/src/bt/blehost/porting/w800/src/npl_os_freertos.c index 2a25be1..2263be2 100644 --- a/src/W800_SDK_v1.00.10/src/bt/blehost/porting/w800/src/npl_os_freertos.c +++ b/src/W800_SDK_v1.00.10/src/bt/blehost/porting/w800/src/npl_os_freertos.c @@ -248,8 +248,12 @@ os_callout_timer_cb(void *ptmr, void *parg) struct ble_npl_callout *co; co = (struct ble_npl_callout *)parg; - if(co->evq) { - ble_npl_eventq_put(co->evq, &co->ev); + if(co->evq) + { + /* In some cases, the event queue g_eventq_dflt is already + deleted when this callback is called raising an issue ! */ + if(co->evq->q) + ble_npl_eventq_put(co->evq, &co->ev); } else { co->ev.fn(&co->ev); }