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

Commit aad165e7 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Fix HID crashing on no descriptor

Bug: 62461796
Test: compilation test
Change-Id: Ic7b1fcc4b6f3c8680f1810679ed609f2691fa4aa
parent d7221372
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -1443,6 +1443,11 @@ static void read_report_ref_desc_cb(uint16_t conn_id, tGATT_STATUS status,
  const tBTA_GATTC_DESCRIPTOR* p_desc =
  const tBTA_GATTC_DESCRIPTOR* p_desc =
      BTA_GATTC_GetDescriptor(conn_id, handle);
      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;
  tBTA_HH_LE_RPT* p_rpt;
  p_rpt = bta_hh_le_find_report_entry(
  p_rpt = bta_hh_le_find_report_entry(
      p_dev_cb, p_desc->characteristic->service->handle, GATT_UUID_HID_REPORT,
      p_dev_cb, p_desc->characteristic->service->handle, GATT_UUID_HID_REPORT,