- fix crash if a worker thread is the first thread to queue drawer commands

This commit is contained in:
Magnus Norddahl 2017-03-14 23:47:41 +01:00
parent 3838ec3edc
commit 93908bc2ef
1 changed files with 1 additions and 1 deletions

View File

@ -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<std::mutex> start_lock(queue->start_mutex);
std::unique_lock<std::mutex> end_lock(queue->end_mutex);
queue->StartThreads();
queue->active_commands.push_back(commands);
queue->tasks_left += queue->threads.size();
end_lock.unlock();