mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
Fix Win32Thread not capturing by move
std::function does not allow non-movable lambdas, so capturing by move doesn't work there. And the old solution of course has issues with dangling pointers (but because this is C++ the compiler still thinks it's A-Ok).
This commit is contained in:
@@ -18,7 +18,8 @@
|
||||
|
||||
PluginContext::PluginContext() : context(), events_timer(context) {}
|
||||
|
||||
uint32_t WINAPI win32_thread_trampoline(std::function<void()>* entry_point) {
|
||||
uint32_t WINAPI
|
||||
win32_thread_trampoline(fu2::unique_function<void()>* entry_point) {
|
||||
(*entry_point)();
|
||||
delete entry_point;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user