mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Forcefully initialize the thread local object
Not sure why the initialization wouldn't work, but apparently in some cases it doesn't. This will still only be initialized once, hopefully.
This commit is contained in:
@@ -215,6 +215,14 @@ class Vst3MessageHandler : public AdHocSocketHandler<Thread> {
|
||||
thread_local std::optional<Request> persistent_object(
|
||||
persistent_buffers ? std::make_optional<Request>() : std::nullopt);
|
||||
|
||||
// FIXME: In some cases this didn't get initialized for some reason.
|
||||
// Figure out why.
|
||||
if constexpr (persistent_buffers) {
|
||||
if (!persistent_object) {
|
||||
persistent_object.emplace();
|
||||
}
|
||||
}
|
||||
|
||||
// Reading, processing, and writing back the response for the requests
|
||||
// we receive works in the same way regardless of which socket we're
|
||||
// using
|
||||
|
||||
Reference in New Issue
Block a user