summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibAudio/UserSampleQueue.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibAudio/UserSampleQueue.cpp b/Userland/Libraries/LibAudio/UserSampleQueue.cpp
index f58601849a..020cafb8b1 100644
--- a/Userland/Libraries/LibAudio/UserSampleQueue.cpp
+++ b/Userland/Libraries/LibAudio/UserSampleQueue.cpp
@@ -51,6 +51,7 @@ size_t UserSampleQueue::size()
size_t UserSampleQueue::remaining_samples()
{
Threading::MutexLocker lock(m_sample_mutex);
+ VERIFY(m_backing_samples.size() >= m_samples_to_discard);
return m_backing_samples.size() - m_samples_to_discard;
}