OSDN Git Service

Fix APR crashes in read rssi callback
authorJakub Pawlowski <jpawlowski@google.com>
Fri, 5 Aug 2016 12:32:37 +0000 (05:32 -0700)
committerJakub Pawlowski <jpawlowski@google.com>
Fri, 5 Aug 2016 12:32:37 +0000 (05:32 -0700)
When read RSSI timeouts, callback is called with NULL result. This was
causing crash.

Bug: 30562545
Change-Id: If379c2de4ceab48c021601851a8c83f995440460

btif/src/btif_gatt_client.c

index 57b5958..c70fa49 100644 (file)
@@ -1023,6 +1023,9 @@ static void bta_track_adv_event_cb(tBTA_DM_BLE_TRACK_ADV_DATA *p_track_adv_data)
 
 static void btm_read_rssi_cb (tBTM_RSSI_RESULTS *p_result)
 {
+    if (!p_result)
+      return;
+
     btif_gattc_cb_t btif_cb;
 
     bdcpy(btif_cb.bd_addr.address, p_result->rem_bda);