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

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

Fix NPE when discovering invalid GATT datatbase am: 1ebda34c

am: 12cdf1bf

Change-Id: I1e9710d05b0276106c0fd19604db2b9db5cde257
parents e41be08d 12cdf1bf
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -318,7 +318,8 @@ static tBTA_GATT_STATUS bta_gattc_add_attr_to_cache(
    descriptor->handle = handle;
    memcpy(&descriptor->uuid, p_uuid, sizeof(tBT_UUID));

    if (service->characteristics == NULL) {
    if (service->characteristics == NULL ||
        list_is_empty(service->characteristics)) {
      APPL_TRACE_ERROR(
          "%s: Illegal action to add descriptor before adding a "
          "characteristic!",