diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b0b445f..269bcb72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/src/wine-host/bridges/vst3.cpp b/src/wine-host/bridges/vst3.cpp index 284c16a0..548a26f4 100644 --- a/src/wine-host/bridges/vst3.cpp +++ b/src/wine-host/bridges/vst3.cpp @@ -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 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();