mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-17 00:43:56 +02:00
Avoid potential UB in loggers using composition
This cast would work fine, but any other fields added to those loggers would be left uninitialized.
This commit is contained in:
@@ -174,9 +174,10 @@ class Vst3MessageHandler : public AdHocSocketHandler<Thread> {
|
||||
write_object(socket, response);
|
||||
};
|
||||
|
||||
this->receive_multi(
|
||||
logging ? std::optional(std::ref(logging->first)) : std::nullopt,
|
||||
process_message);
|
||||
this->receive_multi(logging
|
||||
? std::optional(std::ref(logging->first.logger))
|
||||
: std::nullopt,
|
||||
process_message);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user