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

Commit 513d17cf authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Gerrit Code Review
Browse files

Merge "leaudio: Fix getting first device."

parents afee2d5c 4ecf41f1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -106,7 +106,10 @@ void LeAudioDeviceGroup::Deactivate(void) {
}

LeAudioDevice* LeAudioDeviceGroup::GetFirstDevice(void) {
  return (leAudioDevices_.front().lock()).get();
  auto d = leAudioDevices_.front();
  if (d.expired()) return nullptr;

  return (d.lock()).get();
}

LeAudioDevice* LeAudioDeviceGroup::GetFirstDeviceWithActiveContext(