Allow plug view creation to fail

This commit is contained in:
Robbert van der Helm
2021-07-05 14:56:46 +02:00
parent 4c24baa3d2
commit 97ff407ef6
2 changed files with 13 additions and 2 deletions
+3
View File
@@ -66,6 +66,9 @@ Versioning](https://semver.org/spec/v2.0.0.html).
process failed to start treating zombie processes as still running. This could
cause plugins to hang during scanning if the Wine process crashed in a very
specific (and likely impossible) way.
- In the event a VST3 plugin were to return a null pointer for
`IEditController::createView()`, this will now be propagated correctly on the
plugin side.
- Fixed VST2 speaker arrangement configurations returned by the plugin not being
serialized correctly. No plugins seem to actually use these, so it should not
have caused any issues.
+10 -2
View File
@@ -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();