mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 20:10:13 +02:00
Allow plug view creation to fail
This commit is contained in:
@@ -466,11 +466,19 @@ void Vst3Bridge::run() {
|
||||
// Instantiate the object from the GUI thread
|
||||
main_context
|
||||
.run_in_context([&]() -> void {
|
||||
object_instances.at(request.instance_id)
|
||||
.plug_view_instance.emplace(Steinberg::owned(
|
||||
Steinberg::IPtr<Steinberg::IPlugView> plug_view(
|
||||
Steinberg::owned(
|
||||
object_instances.at(request.instance_id)
|
||||
.edit_controller->createView(
|
||||
request.name.c_str())));
|
||||
|
||||
if (plug_view) {
|
||||
object_instances.at(request.instance_id)
|
||||
.plug_view_instance.emplace(plug_view);
|
||||
} else {
|
||||
object_instances.at(request.instance_id)
|
||||
.plug_view_instance.reset()
|
||||
}
|
||||
})
|
||||
.wait();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user