From 93908bc2efaf950b89960faa3951e2509a76db55 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Tue, 14 Mar 2017 23:47:41 +0100 Subject: [PATCH] - fix crash if a worker thread is the first thread to queue drawer commands --- src/swrenderer/drawers/r_thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/swrenderer/drawers/r_thread.cpp b/src/swrenderer/drawers/r_thread.cpp index d8b3b3389..50e56a464 100644 --- a/src/swrenderer/drawers/r_thread.cpp +++ b/src/swrenderer/drawers/r_thread.cpp @@ -59,11 +59,11 @@ void DrawerThreads::Execute(DrawerCommandQueuePtr commands) return; auto queue = Instance(); - queue->StartThreads(); // Add to queue and awaken worker threads std::unique_lock start_lock(queue->start_mutex); std::unique_lock end_lock(queue->end_mutex); + queue->StartThreads(); queue->active_commands.push_back(commands); queue->tasks_left += queue->threads.size(); end_lock.unlock();