Diff between 8c89636ae69c64e6e60eea3f93496f9c4013a324 and 21d4d3b7a7b2d410e24e4574adc17057b1996a9e
Changed Files
| File | Additions | Deletions | Status |
| android/gatt.c | +3 | -0 | modified |
Full Patch
diff --git a/android/gatt.c b/android/gatt.c
index fd95400..9e0ee3f 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -5588,6 +5588,9 @@ static void handle_server_send_response(const void *buf, uint16_t len)
* gatt_db_attribute_write().
*/
req = queue_peek_head(conn->device->pending_requests);
+ if (!req)
+ goto done;
+
/* Cast status to uint8_t, due to (byte) cast in java layer. */
req->error = err_to_att((uint8_t) cmd->status);
req->state = REQUEST_DONE;