check att_write_callback != null before calling it

This commit is contained in:
matthias.ringwald 2014-06-08 20:25:27 +00:00
parent b9169cb80a
commit 760b5fafed

View File

@ -926,6 +926,7 @@ static uint16_t handle_prepare_write_request(att_connection_t * att_connection,
* @brief transcation queue of prepared writes, e.g., after disconnect
*/
void att_clear_transaction_queue(){
if (!att_clear_transaction_queue) return;
(*att_write_callback)(0, ATT_TRANSACTION_MODE_CANCEL, 0, NULL, 0, NULL);
}