mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-25 05:21:02 +00:00
- fix crash if a worker thread is the first thread to queue drawer commands
This commit is contained in:
parent
3838ec3edc
commit
93908bc2ef
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue