From d6d465cdf4c861661ae18ddd86f454650c5dccf6 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 27 Dec 2016 07:57:22 +0100 Subject: [PATCH] output/Thread: fix assertion failure in CLOSE handler Convert assertion to runtime check; this assertion could fail when the output was closed due to an error before CLOSE arrived. --- src/output/OutputThread.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/output/OutputThread.cxx b/src/output/OutputThread.cxx index ff30b8d1f..6deadc981 100644 --- a/src/output/OutputThread.cxx +++ b/src/output/OutputThread.cxx @@ -443,9 +443,8 @@ AudioOutput::Task() break; case Command::CLOSE: - assert(open); - - Close(false); + if (open) + Close(false); CommandFinished(); break;