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:
Robbert van der Helm
2021-01-08 18:19:23 +01:00
parent 2fc7621aee
commit 07a994089b
3 changed files with 265 additions and 125 deletions
@@ -39,20 +39,33 @@ Vst3PlugViewProxyImpl::queryInterface(const Steinberg::TUID _iid, void** obj) {
tresult PLUGIN_API tresult PLUGIN_API
Vst3PlugViewProxyImpl::isPlatformTypeSupported(Steinberg::FIDString type) { Vst3PlugViewProxyImpl::isPlatformTypeSupported(Steinberg::FIDString type) {
// We'll swap the X11 window ID platform type string for the Win32 HWND if (type) {
// equivalent on the Wine side // We'll swap the X11 window ID platform type string for the Win32 HWND
return bridge.send_message(YaPlugView::IsPlatformTypeSupported{ // equivalent on the Wine side
.owner_instance_id = owner_instance_id(), .type = type}); return bridge.send_message(YaPlugView::IsPlatformTypeSupported{
.owner_instance_id = owner_instance_id(), .type = type});
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'IPlugView::isPlatformTypeSupported()'");
return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API Vst3PlugViewProxyImpl::attached(void* parent, tresult PLUGIN_API Vst3PlugViewProxyImpl::attached(void* parent,
Steinberg::FIDString type) { Steinberg::FIDString type) {
// We will embed the Wine Win32 window into the X11 window provided by the if (parent && type) {
// host // We will embed the Wine Win32 window into the X11 window provided by
return bridge.send_message( // the host
YaPlugView::Attached{.owner_instance_id = owner_instance_id(), return bridge.send_message(YaPlugView::Attached{
.parent = reinterpret_cast<native_size_t>(parent), .owner_instance_id = owner_instance_id(),
.type = type}); .parent = reinterpret_cast<native_size_t>(parent),
.type = type});
} else {
bridge.logger.log(
"WARNING: Null pointer passed to 'IPlugView::attached()'");
return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API Vst3PlugViewProxyImpl::removed() { tresult PLUGIN_API Vst3PlugViewProxyImpl::removed() {
@@ -119,6 +132,7 @@ tresult PLUGIN_API Vst3PlugViewProxyImpl::onFocus(TBool state) {
tresult PLUGIN_API tresult PLUGIN_API
Vst3PlugViewProxyImpl::setFrame(Steinberg::IPlugFrame* frame) { Vst3PlugViewProxyImpl::setFrame(Steinberg::IPlugFrame* frame) {
// TODO: Null pointers are valid here, should we pass them through?
if (frame) { if (frame) {
// We'll store the pointer for when the plugin later makes a callback to // We'll store the pointer for when the plugin later makes a callback to
// this component handler // this component handler
+229 -110
View File
@@ -158,13 +158,22 @@ uint32 PLUGIN_API Vst3PluginProxyImpl::getTailSamples() {
tresult PLUGIN_API tresult PLUGIN_API
Vst3PluginProxyImpl::getControllerClassId(Steinberg::TUID classId) { Vst3PluginProxyImpl::getControllerClassId(Steinberg::TUID classId) {
const GetControllerClassIdResponse response = if (classId) {
bridge.send_audio_processor_message( const GetControllerClassIdResponse response =
YaComponent::GetControllerClassId{.instance_id = instance_id()}); bridge.send_audio_processor_message(
YaComponent::GetControllerClassId{.instance_id =
instance_id()});
std::copy(response.editor_cid.begin(), response.editor_cid.end(), classId); std::copy(response.editor_cid.begin(), response.editor_cid.end(),
classId);
return response.result; return response.result;
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'IComponent::getControllerClassId()'");
return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API Vst3PluginProxyImpl::setIoMode(Steinberg::Vst::IoMode mode) { tresult PLUGIN_API Vst3PluginProxyImpl::setIoMode(Steinberg::Vst::IoMode mode) {
@@ -227,21 +236,36 @@ tresult PLUGIN_API Vst3PluginProxyImpl::setActive(TBool state) {
} }
tresult PLUGIN_API Vst3PluginProxyImpl::setState(Steinberg::IBStream* state) { tresult PLUGIN_API Vst3PluginProxyImpl::setState(Steinberg::IBStream* state) {
// Since both interfaces contain this function, this is used for both if (state) {
// `IComponent::setState()` as well as `IEditController::setState()` // Since both interfaces contain this function, this is used for both
return bridge.send_message(Vst3PluginProxy::SetState{ // `IComponent::setState()` as well as `IEditController::setState()`
.instance_id = instance_id(), .state = state}); return bridge.send_message(Vst3PluginProxy::SetState{
.instance_id = instance_id(), .state = state});
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'I{Component,EditController}::setState()'");
return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API Vst3PluginProxyImpl::getState(Steinberg::IBStream* state) { tresult PLUGIN_API Vst3PluginProxyImpl::getState(Steinberg::IBStream* state) {
// Since both interfaces contain this function, this is used for both if (state) {
// `IComponent::getState()` as well as `IEditController::getState()` // Since both interfaces contain this function, this is used for both
const GetStateResponse response = bridge.send_message( // `IComponent::getState()` as well as `IEditController::getState()`
Vst3PluginProxy::GetState{.instance_id = instance_id()}); const GetStateResponse response = bridge.send_message(
Vst3PluginProxy::GetState{.instance_id = instance_id()});
assert(response.updated_state.write_back(state) == Steinberg::kResultOk); assert(response.updated_state.write_back(state) ==
Steinberg::kResultOk);
return response.result; return response.result;
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'I{Component,EditController}::getState()'");
return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API Vst3PluginProxyImpl::connect(IConnectionPoint* other) { tresult PLUGIN_API Vst3PluginProxyImpl::connect(IConnectionPoint* other) {
@@ -305,8 +329,15 @@ Vst3PluginProxyImpl::notify(Steinberg::Vst::IMessage* message) {
tresult PLUGIN_API tresult PLUGIN_API
Vst3PluginProxyImpl::setComponentState(Steinberg::IBStream* state) { Vst3PluginProxyImpl::setComponentState(Steinberg::IBStream* state) {
return bridge.send_message(YaEditController::SetComponentState{ if (state) {
.instance_id = instance_id(), .state = state}); return bridge.send_message(YaEditController::SetComponentState{
.instance_id = instance_id(), .state = state});
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'IEditController::setComponentState()'");
return Steinberg::kInvalidArgument;
}
} }
int32 PLUGIN_API Vst3PluginProxyImpl::getParameterCount() { int32 PLUGIN_API Vst3PluginProxyImpl::getParameterCount() {
@@ -331,29 +362,43 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getParamStringByValue(
Steinberg::Vst::ParamID id, Steinberg::Vst::ParamID id,
Steinberg::Vst::ParamValue valueNormalized /*in*/, Steinberg::Vst::ParamValue valueNormalized /*in*/,
Steinberg::Vst::String128 string /*out*/) { Steinberg::Vst::String128 string /*out*/) {
const GetParamStringByValueResponse response = if (string) {
bridge.send_message(YaEditController::GetParamStringByValue{ const GetParamStringByValueResponse response =
.instance_id = instance_id(), bridge.send_message(YaEditController::GetParamStringByValue{
.id = id, .instance_id = instance_id(),
.value_normalized = valueNormalized}); .id = id,
.value_normalized = valueNormalized});
std::copy(response.string.begin(), response.string.end(), string); std::copy(response.string.begin(), response.string.end(), string);
string[response.string.size()] = 0; string[response.string.size()] = 0;
return response.result; return response.result;
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'IEditController::getParamStringByValue()'");
return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API Vst3PluginProxyImpl::getParamValueByString( tresult PLUGIN_API Vst3PluginProxyImpl::getParamValueByString(
Steinberg::Vst::ParamID id, Steinberg::Vst::ParamID id,
Steinberg::Vst::TChar* string /*in*/, Steinberg::Vst::TChar* string /*in*/,
Steinberg::Vst::ParamValue& valueNormalized /*out*/) { Steinberg::Vst::ParamValue& valueNormalized /*out*/) {
const GetParamValueByStringResponse response = if (string) {
bridge.send_message(YaEditController::GetParamValueByString{ const GetParamValueByStringResponse response =
.instance_id = instance_id(), .id = id, .string = string}); bridge.send_message(YaEditController::GetParamValueByString{
.instance_id = instance_id(), .id = id, .string = string});
valueNormalized = response.value_normalized; valueNormalized = response.value_normalized;
return response.result; return response.result;
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'IEditController::getParamValueByString()'");
return Steinberg::kInvalidArgument;
}
} }
Steinberg::Vst::ParamValue PLUGIN_API Steinberg::Vst::ParamValue PLUGIN_API
@@ -389,6 +434,7 @@ Vst3PluginProxyImpl::setParamNormalized(Steinberg::Vst::ParamID id,
tresult PLUGIN_API Vst3PluginProxyImpl::setComponentHandler( tresult PLUGIN_API Vst3PluginProxyImpl::setComponentHandler(
Steinberg::Vst::IComponentHandler* handler) { Steinberg::Vst::IComponentHandler* handler) {
// TODO: Null pointers are valid here, should we pass them through?
if (handler) { if (handler) {
// We'll store the pointer for when the plugin later makes a callback to // We'll store the pointer for when the plugin later makes a callback to
// this component handler // this component handler
@@ -415,22 +461,29 @@ tresult PLUGIN_API Vst3PluginProxyImpl::setComponentHandler(
Steinberg::IPlugView* PLUGIN_API Steinberg::IPlugView* PLUGIN_API
Vst3PluginProxyImpl::createView(Steinberg::FIDString name) { Vst3PluginProxyImpl::createView(Steinberg::FIDString name) {
CreateViewResponse response = if (name) {
bridge.send_message(YaEditController::CreateView{ CreateViewResponse response =
.instance_id = instance_id(), .name = name}); bridge.send_message(YaEditController::CreateView{
.instance_id = instance_id(), .name = name});
if (response.plug_view_args) { if (response.plug_view_args) {
// The host should manage this. Returning raw pointers feels scary. // The host should manage this. Returning raw pointers feels scary.
auto plug_view_proxy = new Vst3PlugViewProxyImpl( auto plug_view_proxy = new Vst3PlugViewProxyImpl(
bridge, std::move(*response.plug_view_args)); bridge, std::move(*response.plug_view_args));
// We also need to store an (unmanaged, since we don't want to affect // We also need to store an (unmanaged, since we don't want to
// the reference counting) pointer to this to be able to handle calls to // affect the reference counting) pointer to this to be able to
// `IPlugFrame::resizeView()` in the future // handle calls to `IPlugFrame::resizeView()` in the future
last_created_plug_view = plug_view_proxy; last_created_plug_view = plug_view_proxy;
return plug_view_proxy; return plug_view_proxy;
} else {
return nullptr;
}
} else { } else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'IEditController::createView()'");
return nullptr; return nullptr;
} }
} }
@@ -537,18 +590,26 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getNoteExpressionStringByValue(
Steinberg::Vst::NoteExpressionTypeID id, Steinberg::Vst::NoteExpressionTypeID id,
Steinberg::Vst::NoteExpressionValue valueNormalized /*in*/, Steinberg::Vst::NoteExpressionValue valueNormalized /*in*/,
Steinberg::Vst::String128 string /*out*/) { Steinberg::Vst::String128 string /*out*/) {
const GetNoteExpressionStringByValueResponse response = bridge.send_message( if (string) {
YaNoteExpressionController::GetNoteExpressionStringByValue{ const GetNoteExpressionStringByValueResponse response =
.instance_id = instance_id(), bridge.send_message(
.bus_index = busIndex, YaNoteExpressionController::GetNoteExpressionStringByValue{
.channel = channel, .instance_id = instance_id(),
.id = id, .bus_index = busIndex,
.value_normalized = valueNormalized}); .channel = channel,
.id = id,
.value_normalized = valueNormalized});
std::copy(response.string.begin(), response.string.end(), string); std::copy(response.string.begin(), response.string.end(), string);
string[response.string.size()] = 0; string[response.string.size()] = 0;
return response.result; return response.result;
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'INoteExpressionController::getNoteExpressionStringByValue()'");
return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API Vst3PluginProxyImpl::getNoteExpressionValueByString( tresult PLUGIN_API Vst3PluginProxyImpl::getNoteExpressionValueByString(
@@ -557,17 +618,25 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getNoteExpressionValueByString(
Steinberg::Vst::NoteExpressionTypeID id, Steinberg::Vst::NoteExpressionTypeID id,
const Steinberg::Vst::TChar* string /*in*/, const Steinberg::Vst::TChar* string /*in*/,
Steinberg::Vst::NoteExpressionValue& valueNormalized /*out*/) { Steinberg::Vst::NoteExpressionValue& valueNormalized /*out*/) {
const GetNoteExpressionValueByStringResponse response = bridge.send_message( if (string) {
YaNoteExpressionController::GetNoteExpressionValueByString{ const GetNoteExpressionValueByStringResponse response =
.instance_id = instance_id(), bridge.send_message(
.bus_index = busIndex, YaNoteExpressionController::GetNoteExpressionValueByString{
.channel = channel, .instance_id = instance_id(),
.id = id, .bus_index = busIndex,
.string = string}); .channel = channel,
.id = id,
.string = string});
valueNormalized = response.value_normalized; valueNormalized = response.value_normalized;
return response.result; return response.result;
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'INoteExpressionController::getNoteExpressionValueByString()'");
return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API Vst3PluginProxyImpl::initialize(FUnknown* context) { tresult PLUGIN_API Vst3PluginProxyImpl::initialize(FUnknown* context) {
@@ -608,25 +677,39 @@ tresult PLUGIN_API
Vst3PluginProxyImpl::getProgramData(Steinberg::Vst::ProgramListID listId, Vst3PluginProxyImpl::getProgramData(Steinberg::Vst::ProgramListID listId,
int32 programIndex, int32 programIndex,
Steinberg::IBStream* data) { Steinberg::IBStream* data) {
const GetProgramDataResponse response = bridge.send_message( if (data) {
YaProgramListData::GetProgramData{.instance_id = instance_id(), const GetProgramDataResponse response = bridge.send_message(
.list_id = listId, YaProgramListData::GetProgramData{.instance_id = instance_id(),
.program_index = programIndex}); .list_id = listId,
.program_index = programIndex});
assert(response.data.write_back(data) == Steinberg::kResultOk); assert(response.data.write_back(data) == Steinberg::kResultOk);
return response.result; return response.result;
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'IProgramListData::getProgramData()'");
return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API tresult PLUGIN_API
Vst3PluginProxyImpl::setProgramData(Steinberg::Vst::ProgramListID listId, Vst3PluginProxyImpl::setProgramData(Steinberg::Vst::ProgramListID listId,
int32 programIndex, int32 programIndex,
Steinberg::IBStream* data) { Steinberg::IBStream* data) {
return bridge.send_message( if (data) {
YaProgramListData::SetProgramData{.instance_id = instance_id(), return bridge.send_message(
.list_id = listId, YaProgramListData::SetProgramData{.instance_id = instance_id(),
.program_index = programIndex, .list_id = listId,
.data = data}); .program_index = programIndex,
.data = data});
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'IProgramListData::setProgramData()'");
return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API tresult PLUGIN_API
@@ -638,20 +721,32 @@ Vst3PluginProxyImpl::unitDataSupported(Steinberg::Vst::UnitID unitId) {
tresult PLUGIN_API tresult PLUGIN_API
Vst3PluginProxyImpl::getUnitData(Steinberg::Vst::UnitID unitId, Vst3PluginProxyImpl::getUnitData(Steinberg::Vst::UnitID unitId,
Steinberg::IBStream* data) { Steinberg::IBStream* data) {
const GetUnitDataResponse response = if (data) {
bridge.send_message(YaUnitData::GetUnitData{ const GetUnitDataResponse response =
.instance_id = instance_id(), .unit_id = unitId}); bridge.send_message(YaUnitData::GetUnitData{
.instance_id = instance_id(), .unit_id = unitId});
assert(response.data.write_back(data) == Steinberg::kResultOk); assert(response.data.write_back(data) == Steinberg::kResultOk);
return response.result; return response.result;
} else {
bridge.logger.log(
"WARNING: Null pointer passed to 'IUnitData::getUnitData()'");
return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API tresult PLUGIN_API
Vst3PluginProxyImpl::setUnitData(Steinberg::Vst::UnitID unitId, Vst3PluginProxyImpl::setUnitData(Steinberg::Vst::UnitID unitId,
Steinberg::IBStream* data) { Steinberg::IBStream* data) {
return bridge.send_message(YaUnitData::SetUnitData{ if (data) {
.instance_id = instance_id(), .unit_id = unitId, .data = data}); return bridge.send_message(YaUnitData::SetUnitData{
.instance_id = instance_id(), .unit_id = unitId, .data = data});
} else {
bridge.logger.log(
"WARNING: Null pointer passed to 'IUnitData::setUnitData()'");
return Steinberg::kInvalidArgument;
}
} }
int32 PLUGIN_API Vst3PluginProxyImpl::getUnitCount() { int32 PLUGIN_API Vst3PluginProxyImpl::getUnitCount() {
@@ -692,15 +787,21 @@ tresult PLUGIN_API
Vst3PluginProxyImpl::getProgramName(Steinberg::Vst::ProgramListID listId, Vst3PluginProxyImpl::getProgramName(Steinberg::Vst::ProgramListID listId,
int32 programIndex, int32 programIndex,
Steinberg::Vst::String128 name /*out*/) { Steinberg::Vst::String128 name /*out*/) {
const GetProgramNameResponse response = bridge.send_message( if (name) {
YaUnitInfo::GetProgramName{.instance_id = instance_id(), const GetProgramNameResponse response = bridge.send_message(
.list_id = listId, YaUnitInfo::GetProgramName{.instance_id = instance_id(),
.program_index = programIndex}); .list_id = listId,
.program_index = programIndex});
std::copy(response.name.begin(), response.name.end(), name); std::copy(response.name.begin(), response.name.end(), name);
name[response.name.size()] = 0; name[response.name.size()] = 0;
return response.result; return response.result;
} else {
bridge.logger.log(
"WARNING: Null pointer passed to 'IUnitInfo::getProgramName()'");
return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API Vst3PluginProxyImpl::getProgramInfo( tresult PLUGIN_API Vst3PluginProxyImpl::getProgramInfo(
@@ -708,19 +809,23 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getProgramInfo(
int32 programIndex, int32 programIndex,
Steinberg::Vst::CString attributeId /*in*/, Steinberg::Vst::CString attributeId /*in*/,
Steinberg::Vst::String128 attributeValue /*out*/) { Steinberg::Vst::String128 attributeValue /*out*/) {
assert(attributeId); if (attributeId && attributeValue) {
const GetProgramInfoResponse response = bridge.send_message(
YaUnitInfo::GetProgramInfo{.instance_id = instance_id(),
.list_id = listId,
.program_index = programIndex,
.attribute_id = attributeId});
const GetProgramInfoResponse response = bridge.send_message( std::copy(response.attribute_value.begin(),
YaUnitInfo::GetProgramInfo{.instance_id = instance_id(), response.attribute_value.end(), attributeValue);
.list_id = listId, attributeValue[response.attribute_value.size()] = 0;
.program_index = programIndex,
.attribute_id = attributeId});
std::copy(response.attribute_value.begin(), response.attribute_value.end(), return response.result;
attributeValue); } else {
attributeValue[response.attribute_value.size()] = 0; bridge.logger.log(
"WARNING: Null pointer passed to 'IUnitInfo::getProgramInfo()'");
return response.result; return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API tresult PLUGIN_API
@@ -737,16 +842,23 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getProgramPitchName(
int32 programIndex, int32 programIndex,
int16 midiPitch, int16 midiPitch,
Steinberg::Vst::String128 name /*out*/) { Steinberg::Vst::String128 name /*out*/) {
const GetProgramPitchNameResponse response = bridge.send_message( if (name) {
YaUnitInfo::GetProgramPitchName{.instance_id = instance_id(), const GetProgramPitchNameResponse response = bridge.send_message(
.list_id = listId, YaUnitInfo::GetProgramPitchName{.instance_id = instance_id(),
.program_index = programIndex, .list_id = listId,
.midi_pitch = midiPitch}); .program_index = programIndex,
.midi_pitch = midiPitch});
std::copy(response.name.begin(), response.name.end(), name); std::copy(response.name.begin(), response.name.end(), name);
name[response.name.size()] = 0; name[response.name.size()] = 0;
return response.result; return response.result;
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'IUnitInfo::getProgramPitchName()'");
return Steinberg::kInvalidArgument;
}
} }
Steinberg::Vst::UnitID PLUGIN_API Vst3PluginProxyImpl::getSelectedUnit() { Steinberg::Vst::UnitID PLUGIN_API Vst3PluginProxyImpl::getSelectedUnit() {
@@ -782,11 +894,18 @@ tresult PLUGIN_API
Vst3PluginProxyImpl::setUnitProgramData(int32 listOrUnitId, Vst3PluginProxyImpl::setUnitProgramData(int32 listOrUnitId,
int32 programIndex, int32 programIndex,
Steinberg::IBStream* data) { Steinberg::IBStream* data) {
return bridge.send_message( if (data) {
YaUnitInfo::SetUnitProgramData{.instance_id = instance_id(), return bridge.send_message(
.list_or_unit_id = listOrUnitId, YaUnitInfo::SetUnitProgramData{.instance_id = instance_id(),
.program_index = programIndex, .list_or_unit_id = listOrUnitId,
.data = data}); .program_index = programIndex,
.data = data});
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'IUnitInfo::setUnitProgramData()'");
return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API Vst3PluginProxyImpl::getXmlRepresentationStream( tresult PLUGIN_API Vst3PluginProxyImpl::getXmlRepresentationStream(
@@ -43,13 +43,20 @@ Vst3HostContextProxyImpl::queryInterface(const Steinberg::TUID _iid,
tresult PLUGIN_API tresult PLUGIN_API
Vst3HostContextProxyImpl::getName(Steinberg::Vst::String128 name) { Vst3HostContextProxyImpl::getName(Steinberg::Vst::String128 name) {
const GetNameResponse response = bridge.send_message( if (name) {
YaHostApplication::GetName{.owner_instance_id = owner_instance_id()}); const GetNameResponse response =
bridge.send_message(YaHostApplication::GetName{
.owner_instance_id = owner_instance_id()});
std::copy(response.name.begin(), response.name.end(), name); std::copy(response.name.begin(), response.name.end(), name);
name[response.name.size()] = 0; 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 tresult PLUGIN_API