Remove null pointer support in setComponentHandler

This should be an implementation fault.
This commit is contained in:
Robbert van der Helm
2020-12-22 13:54:55 +01:00
parent 37897da2b7
commit 51876a024c
4 changed files with 28 additions and 47 deletions
+8 -14
View File
@@ -255,22 +255,16 @@ void Vst3Bridge::run() {
},
[&](YaEditController::SetComponentHandler& request)
-> YaEditController::SetComponentHandler::Response {
// If we got passed a component handler, we'll create a proxy
// object and pass that to the initialize function. The lifetime
// of this object is tied to that of the actual plugin object
// we're proxying for.
// We'll create a proxy object for the component handler and
// pass that to the initialize function. The lifetime of this
// object is tied to that of the actual plugin object we're
// proxying for.
// TODO: Does this have to be run from the UI thread? Figure out
// if it does
if (request.component_handler_proxy_args) {
object_instances[request.instance_id]
.component_handler_proxy =
Steinberg::owned(new Vst3ComponentHandlerProxyImpl(
*this,
std::move(*request.component_handler_proxy_args)));
} else {
object_instances[request.instance_id]
.component_handler_proxy = nullptr;
}
object_instances[request.instance_id].component_handler_proxy =
Steinberg::owned(new Vst3ComponentHandlerProxyImpl(
*this,
std::move(request.component_handler_proxy_args)));
return object_instances[request.instance_id]
.edit_controller->setComponentHandler(