Commit 5d6a8b38 authored by Max Kellermann's avatar Max Kellermann

MusicPipe: lock the mutex in Peek() and GetSize()

parent 6a8c2848
......@@ -95,6 +95,7 @@ public:
*/
gcc_pure
const MusicChunk *Peek() const noexcept {
const std::lock_guard<Mutex> protect(mutex);
return head;
}
......@@ -120,6 +121,7 @@ public:
*/
gcc_pure
unsigned GetSize() const noexcept {
const std::lock_guard<Mutex> protect(mutex);
return size;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment