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

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

Add nullptr guard to make static analyzer happy

Change-Id: I95c4954eaea0215f2da00682e4b831eafa6ad506
parent 744846bd
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2414,6 +2414,11 @@ bt_status_t btif_dm_pin_reply(const RawAddress* bd_addr, uint8_t accept,
  BTIF_TRACE_EVENT("%s: accept=%d", __func__, accept);

  if (bluetooth::shim::is_gd_shim_enabled()) {
    if (pin_code == nullptr) {
      LOG_ERROR("Pin code must be not null with GD shim enabled");
      return BT_STATUS_FAIL;
    }

    uint8_t tmp_dev_type = 0;
    uint8_t tmp_addr_type = 0;
    BTM_ReadDevInfo(*bd_addr, &tmp_dev_type, &tmp_addr_type);