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

Commit d4b16824 authored by Marie Janssen's avatar Marie Janssen Committed by Gerrit Code Review
Browse files

Merge "Fix an inappropriate NULL-pointer check in handle_rc_passthrough_cmd"

parents 821b3703 04c10d33
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -732,20 +732,19 @@ void handle_rc_disconnect(tBTA_AV_RC_CLOSE* p_rc_close) {
 *
 ***************************************************************************/
void handle_rc_passthrough_cmd(tBTA_AV_REMOTE_CMD* p_remote_cmd) {
  if (p_remote_cmd == NULL) {
    BTIF_TRACE_ERROR("%s: No remote command!", __func__);
    return;
  }

  btif_rc_device_cb_t* p_dev =
      btif_rc_get_device_by_handle(p_remote_cmd->rc_handle);

  if (p_dev == NULL) {
    BTIF_TRACE_ERROR("%s: Got passthrough command from invalid rc handle",
                     __func__);
    return;
  }

  if (p_remote_cmd == NULL) {
    BTIF_TRACE_ERROR("%s: No remote command!", __func__);
    return;
  }

  bt_bdaddr_t rc_addr;
  bdcpy(rc_addr.address, p_dev->rc_addr);