mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-16 05:33:07 +02:00
Add missing null pointer checks
I did double check, and I don't think any of these are supposed to be nullable.
This commit is contained in:
@@ -43,13 +43,20 @@ Vst3HostContextProxyImpl::queryInterface(const Steinberg::TUID _iid,
|
||||
|
||||
tresult PLUGIN_API
|
||||
Vst3HostContextProxyImpl::getName(Steinberg::Vst::String128 name) {
|
||||
const GetNameResponse response = bridge.send_message(
|
||||
YaHostApplication::GetName{.owner_instance_id = owner_instance_id()});
|
||||
if (name) {
|
||||
const GetNameResponse response =
|
||||
bridge.send_message(YaHostApplication::GetName{
|
||||
.owner_instance_id = owner_instance_id()});
|
||||
|
||||
std::copy(response.name.begin(), response.name.end(), name);
|
||||
name[response.name.size()] = 0;
|
||||
std::copy(response.name.begin(), response.name.end(), name);
|
||||
name[response.name.size()] = 0;
|
||||
|
||||
return response.result;
|
||||
return response.result;
|
||||
} else {
|
||||
bridge.logger.log(
|
||||
"WARNING: Null pointer passed to 'IHostApplication::getName()'");
|
||||
return Steinberg::kInvalidArgument;
|
||||
}
|
||||
}
|
||||
|
||||
tresult PLUGIN_API
|
||||
|
||||
Reference in New Issue
Block a user