mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-26 02:37:41 +00:00
avoid crash if no gatt client context can be created
This commit is contained in:
parent
85c40a03e4
commit
ef10893067
@ -186,6 +186,7 @@ static gatt_client_t * provide_context_for_conn_handle(uint16_t con_handle){
|
|||||||
|
|
||||||
static gatt_client_t * provide_context_for_conn_handle_and_start_timer(uint16_t con_handle){
|
static gatt_client_t * provide_context_for_conn_handle_and_start_timer(uint16_t con_handle){
|
||||||
gatt_client_t * context = provide_context_for_conn_handle(con_handle);
|
gatt_client_t * context = provide_context_for_conn_handle(con_handle);
|
||||||
|
if (!context) return NULL;
|
||||||
gatt_client_timeout_start(context);
|
gatt_client_timeout_start(context);
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user