Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ef59928 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by android-build-merger
Browse files

Fix HID crashing on no descriptor

am: 1fc796e2

Change-Id: Idf28228a7f5ef8128baa1171f27be62a913b43c8
parents ffea7e20 1fc796e2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1453,6 +1453,11 @@ static void read_report_ref_desc_cb(uint16_t conn_id, tGATT_STATUS status,
  const tBTA_GATTC_DESCRIPTOR* p_desc =
      BTA_GATTC_GetDescriptor(conn_id, handle);

  if (!p_desc) {
    APPL_TRACE_ERROR("%s: error: descriptor is null!", __func__);
    return;
  }

  tBTA_HH_LE_RPT* p_rpt;
  p_rpt = bta_hh_le_find_report_entry(
      p_dev_cb, p_desc->characteristic->service->handle, GATT_UUID_HID_REPORT,