LibAudio: Only join the background enqueuer thread if has been started

This prevent an assertion failure in SoundPlayer when closing it before
trying to play any audio files.
This commit is contained in:
Andrew Kaster 2022-12-24 22:39:22 -07:00 committed by Andreas Kling
parent 18c559b0e3
commit 140000f37a

View file

@ -55,7 +55,8 @@ void ConnectionToServer::die()
m_enqueuer_loop->quit(0);
}
}
(void)m_background_audio_enqueuer->join();
if (m_background_audio_enqueuer->is_started())
(void)m_background_audio_enqueuer->join();
}
ErrorOr<void> ConnectionToServer::async_enqueue(FixedArray<Sample>&& samples)