mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-10-31 15:20:10 +00:00
Fix race condition causing crashes/undefined behaviour on thread init on windows/MinGW
This commit is contained in:
parent
ab157ea07f
commit
601f3aaef4
@ -86,7 +86,7 @@ inline bool StartNewThread(std::thread *thr, const char *name, TFn&& _Fx, TArgs&
|
||||
} catch (...) {
|
||||
NOT_REACHED();
|
||||
}
|
||||
}, name, std::forward<TFn>(_Fx), std::forward<TArgs>(_Ax)...);
|
||||
}, std::forward<const char *>(name), std::forward<TFn>(_Fx), std::forward<TArgs>(_Ax)...);
|
||||
|
||||
if (thr != nullptr) {
|
||||
*thr = std::move(t);
|
||||
|
Loading…
Reference in New Issue
Block a user