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

Commit 334a5b3d authored by Hui Peng's avatar Hui Peng Committed by Android (Google) Code Review
Browse files

Merge "Fix a nullptr-deref in on_create_record_event" into tm-dev

parents e2418045 b45b8479
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -350,9 +350,9 @@ void on_create_record_event(int id) {
  BTIF_TRACE_DEBUG("Sdp Server %s", __func__);
  const sdp_slot_t* sdp_slot = start_create_sdp(id);
  tBTA_SERVICE_ID service_id = -1;
  bluetooth_sdp_record* record;
  /* In the case we are shutting down, sdp_slot is NULL */
  if (sdp_slot != NULL) {
    bluetooth_sdp_record* record = sdp_slot->record_data;
  if (sdp_slot != nullptr && (record = sdp_slot->record_data) != nullptr) {
    int handle = -1;
    switch (record->hdr.type) {
      case SDP_TYPE_MAP_MAS: