diff --git a/porting/npl/mynewt/include/nimble/nimble_npl_os.h b/porting/npl/mynewt/include/nimble/nimble_npl_os.h index 141cf44b0..8d8ccda3d 100644 --- a/porting/npl/mynewt/include/nimble/nimble_npl_os.h +++ b/porting/npl/mynewt/include/nimble/nimble_npl_os.h @@ -22,6 +22,7 @@ #include #include +#include #include "os/os.h" #ifdef __cplusplus @@ -146,6 +147,7 @@ ble_npl_event_get_arg(struct ble_npl_event *ev) static inline void ble_npl_event_set_arg(struct ble_npl_event *ev, void *arg) { + assert(ev->ev.ev_queued == 0); ev->ev.ev_arg = arg; }