diff --git a/src/btstack_run_loop.c b/src/btstack_run_loop.c index c3b737f55..b9fdb5f06 100644 --- a/src/btstack_run_loop.c +++ b/src/btstack_run_loop.c @@ -94,6 +94,7 @@ void btstack_run_loop_disable_data_source_callbacks(btstack_data_source_t *ds, u void btstack_run_loop_add_data_source(btstack_data_source_t *ds){ btstack_assert(the_run_loop != NULL); btstack_assert(the_run_loop->enable_data_source_callbacks != NULL); + btstack_assert(ds->process != NULL); the_run_loop->add_data_source(ds); } @@ -102,7 +103,8 @@ void btstack_run_loop_add_data_source(btstack_data_source_t *ds){ */ int btstack_run_loop_remove_data_source(btstack_data_source_t *ds){ btstack_assert(the_run_loop != NULL); - btstack_assert(the_run_loop->enable_data_source_callbacks != NULL); + btstack_assert(the_run_loop->disable_data_source_callbacks != NULL); + btstack_assert(ds->process != NULL); return the_run_loop->remove_data_source(ds); } @@ -130,6 +132,7 @@ void * btstack_run_loop_get_timer_context(btstack_timer_source_t *ts){ */ void btstack_run_loop_add_timer(btstack_timer_source_t *ts){ btstack_assert(the_run_loop != NULL); + btstack_assert(ts->process != NULL); the_run_loop->add_timer(ts); }