diff --git a/src/MusicPipe.hxx b/src/MusicPipe.hxx index f9e42326b..ecb923431 100644 --- a/src/MusicPipe.hxx +++ b/src/MusicPipe.hxx @@ -95,6 +95,7 @@ public: */ gcc_pure const MusicChunk *Peek() const noexcept { + const std::lock_guard protect(mutex); return head; } @@ -120,6 +121,7 @@ public: */ gcc_pure unsigned GetSize() const noexcept { + const std::lock_guard protect(mutex); return size; }