avoid crash if no gatt client context can be created

This commit is contained in:
matthias.ringwald@gmail.com 2014-12-11 18:51:10 +00:00
parent 85c40a03e4
commit ef10893067

View File

@ -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){
gatt_client_t * context = provide_context_for_conn_handle(con_handle);
if (!context) return NULL;
gatt_client_timeout_start(context);
return context;
}