Skip to content

Commit

Permalink
v2.7.4: Fixed critical crash in queueTask
Browse files Browse the repository at this point in the history
  • Loading branch information
MCJack123 committed May 14, 2023
1 parent 3c79f2b commit 369b054
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ monitor * findMonitorFromWindowID(Computer *comp, unsigned id, std::string* side
}

void* queueTask(const std::function<void*(void*)>& func, void* arg, bool async) {
if (std::this_thread::get_id() == mainThreadID && !async) return func(arg);
if (std::this_thread::get_id() == mainThreadID && (!async || taskQueue.locked())) return func(arg);
TaskQueueItem * task = new TaskQueueItem;
task->func = func;
task->data = arg;
Expand Down
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{
"name": "sdl2-mixer",
"default-features": true,
"features": [ "libmodplug", "opusfile", "fluidsynth" ]
"features": [ "libmodplug", "opusfile", "fluidsynth", "libflac", "mpg123" ]
}
]
},
Expand Down

0 comments on commit 369b054

Please sign in to comment.