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

Commit b3f44a0c authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "leaudio: Fix possible crash" am: d2537ad0 am: a8fbd356 am: 1419c922 am: e48a63dd

parents 711bc786 e48a63dd
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2174,6 +2174,12 @@ class LeAudioClientImpl : public LeAudioClient {
             ADDRESS_TO_LOGGABLE_CSTR(leAudioDevice->address_),
             leAudioDevice->autoconnect_flag_, reason);

    if (group == nullptr) {
      LOG_ERROR("Group id %d is null", leAudioDevice->group_id_);
      leAudioDevice->SetConnectionState(DeviceConnectState::DISCONNECTED);
      return;
    }

    if (reason != GATT_CONN_TERMINATE_LOCAL_HOST ||
        leAudioDevice->autoconnect_flag_) {
      leAudioDevice->SetConnectionState(