From a32f020b53d36bed8de61d4313c572c72bcde3bb Mon Sep 17 00:00:00 2001 From: qarmin Date: Thu, 30 May 2019 10:28:03 +0200 Subject: Properly unlock mutex --- core/command_queue_mt.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/command_queue_mt.h') diff --git a/core/command_queue_mt.h b/core/command_queue_mt.h index 59eabd8786..798fa4394d 100644 --- a/core/command_queue_mt.h +++ b/core/command_queue_mt.h @@ -406,8 +406,10 @@ class CommandQueueMT { tryagain: // tried to read an empty queue - if (read_ptr == write_ptr) + if (read_ptr == write_ptr) { + if (p_lock) unlock(); return false; + } uint32_t size_ptr = read_ptr; uint32_t size = *(uint32_t *)&command_mem[read_ptr] >> 1; -- cgit v1.2.3