summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2016-08-05 05:32:37 -0700
committerJakub Pawlowski <jpawlowski@google.com>2016-08-05 05:32:37 -0700
commit17be4ae79a4d2890398a31bc15eedbe083b4142c (patch)
tree73622032255a76f97049d69f67470d529e350ae1
parentac9f5fbfa37c3f5551492fedc7385b036d1a47ae (diff)
downloadandroid-system-bt-17be4ae79a4d2890398a31bc15eedbe083b4142c.tar.gz
android-system-bt-17be4ae79a4d2890398a31bc15eedbe083b4142c.tar.xz
Fix APR crashes in read rssi callback
When read RSSI timeouts, callback is called with NULL result. This was causing crash. Bug: 30562545 Change-Id: If379c2de4ceab48c021601851a8c83f995440460
-rw-r--r--btif/src/btif_gatt_client.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/btif/src/btif_gatt_client.c b/btif/src/btif_gatt_client.c
index 57b5958..c70fa49 100644
--- a/btif/src/btif_gatt_client.c
+++ b/btif/src/btif_gatt_client.c
@@ -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);