libossia
libossia copied to clipboard
[osc] crashfix when receiving an OSC message during the generic_device creation
This code crashes if an OSC message is received between the osc_protocol creation and the generic_device creation.
oscDevice = std::make_unique<ossia::net::generic_device>( std::make_unique<ossia::net::osc_protocol>("127.0.0.1", 9996, 9997, std::string("mydevice")), "P");
Another fix would be to call osc_protocol::update_receiver() only when the device is set, but I think it is less readable.