BLE: fixed callback not checking if the event queue exists and executing sometimes after the queue was deleted
This commit is contained in:
parent
bd2a19e2a0
commit
f04b461acb
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user