output/Control: avoid sending KILL twice

This commit is contained in:
Max Kellermann
2020-01-18 21:43:14 +01:00
parent cd612c4eef
commit 37f984ba74
3 changed files with 14 additions and 1 deletions
+3 -1
View File
@@ -377,7 +377,9 @@ AudioOutputControl::BeginDestroy() noexcept
{
if (thread.IsDefined()) {
const std::lock_guard<Mutex> protect(mutex);
if (IsCommandFinished())
if (!killed) {
killed = true;
CommandAsync(Command::KILL);
}
}
}