From d8bb833ba3284ba8e82bfb0723db7f185e1ab133 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 8 Nov 2024 19:09:10 +0100 Subject: [PATCH] output/Source: convert runtime check to assert() Flush() may only be called if the source is open. --- src/output/Source.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/output/Source.cxx b/src/output/Source.cxx index ed9bd6ff2..8ab97a7ef 100644 --- a/src/output/Source.cxx +++ b/src/output/Source.cxx @@ -240,7 +240,7 @@ AudioOutputSource::ConsumeData(size_t nbytes) noexcept std::span AudioOutputSource::Flush() { - return filter - ? filter->Flush() - : std::span{}; + assert(filter); + + return filter->Flush(); }