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) {
if (type) {
// We'll swap the X11 window ID platform type string for the Win32 HWND // We'll swap the X11 window ID platform type string for the Win32 HWND
// equivalent on the Wine side // equivalent on the Wine side
return bridge.send_message(YaPlugView::IsPlatformTypeSupported{ return bridge.send_message(YaPlugView::IsPlatformTypeSupported{
.owner_instance_id = owner_instance_id(), .type = type}); .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{
.owner_instance_id = owner_instance_id(),
.parent = reinterpret_cast<native_size_t>(parent), .parent = reinterpret_cast<native_size_t>(parent),
.type = type}); .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
+131 -12
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) {
if (classId) {
const GetControllerClassIdResponse response = const GetControllerClassIdResponse response =
bridge.send_audio_processor_message( bridge.send_audio_processor_message(
YaComponent::GetControllerClassId{.instance_id = instance_id()}); 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) {
if (state) {
// Since both interfaces contain this function, this is used for both // Since both interfaces contain this function, this is used for both
// `IComponent::setState()` as well as `IEditController::setState()` // `IComponent::setState()` as well as `IEditController::setState()`
return bridge.send_message(Vst3PluginProxy::SetState{ return bridge.send_message(Vst3PluginProxy::SetState{
.instance_id = instance_id(), .state = state}); .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) {
if (state) {
// Since both interfaces contain this function, this is used for both // Since both interfaces contain this function, this is used for both
// `IComponent::getState()` as well as `IEditController::getState()` // `IComponent::getState()` as well as `IEditController::getState()`
const GetStateResponse response = bridge.send_message( const GetStateResponse response = bridge.send_message(
Vst3PluginProxy::GetState{.instance_id = instance_id()}); 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) {
if (state) {
return bridge.send_message(YaEditController::SetComponentState{ return bridge.send_message(YaEditController::SetComponentState{
.instance_id = instance_id(), .state = state}); .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,6 +362,7 @@ 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*/) {
if (string) {
const GetParamStringByValueResponse response = const GetParamStringByValueResponse response =
bridge.send_message(YaEditController::GetParamStringByValue{ bridge.send_message(YaEditController::GetParamStringByValue{
.instance_id = instance_id(), .instance_id = instance_id(),
@@ -341,12 +373,19 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getParamStringByValue(
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*/) {
if (string) {
const GetParamValueByStringResponse response = const GetParamValueByStringResponse response =
bridge.send_message(YaEditController::GetParamValueByString{ bridge.send_message(YaEditController::GetParamValueByString{
.instance_id = instance_id(), .id = id, .string = string}); .instance_id = instance_id(), .id = id, .string = string});
@@ -354,6 +393,12 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getParamValueByString(
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,6 +461,7 @@ tresult PLUGIN_API Vst3PluginProxyImpl::setComponentHandler(
Steinberg::IPlugView* PLUGIN_API Steinberg::IPlugView* PLUGIN_API
Vst3PluginProxyImpl::createView(Steinberg::FIDString name) { Vst3PluginProxyImpl::createView(Steinberg::FIDString name) {
if (name) {
CreateViewResponse response = CreateViewResponse response =
bridge.send_message(YaEditController::CreateView{ bridge.send_message(YaEditController::CreateView{
.instance_id = instance_id(), .name = name}); .instance_id = instance_id(), .name = name});
@@ -424,15 +471,21 @@ Vst3PluginProxyImpl::createView(Steinberg::FIDString name) {
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 { } else {
return nullptr; return nullptr;
} }
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'IEditController::createView()'");
return nullptr;
}
} }
tresult PLUGIN_API tresult PLUGIN_API
@@ -537,7 +590,9 @@ 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) {
const GetNoteExpressionStringByValueResponse response =
bridge.send_message(
YaNoteExpressionController::GetNoteExpressionStringByValue{ YaNoteExpressionController::GetNoteExpressionStringByValue{
.instance_id = instance_id(), .instance_id = instance_id(),
.bus_index = busIndex, .bus_index = busIndex,
@@ -549,6 +604,12 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getNoteExpressionStringByValue(
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,7 +618,9 @@ 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) {
const GetNoteExpressionValueByStringResponse response =
bridge.send_message(
YaNoteExpressionController::GetNoteExpressionValueByString{ YaNoteExpressionController::GetNoteExpressionValueByString{
.instance_id = instance_id(), .instance_id = instance_id(),
.bus_index = busIndex, .bus_index = busIndex,
@@ -568,6 +631,12 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getNoteExpressionValueByString(
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,6 +677,7 @@ 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) {
if (data) {
const GetProgramDataResponse response = bridge.send_message( const GetProgramDataResponse response = bridge.send_message(
YaProgramListData::GetProgramData{.instance_id = instance_id(), YaProgramListData::GetProgramData{.instance_id = instance_id(),
.list_id = listId, .list_id = listId,
@@ -616,17 +686,30 @@ Vst3PluginProxyImpl::getProgramData(Steinberg::Vst::ProgramListID listId,
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) {
if (data) {
return bridge.send_message( return bridge.send_message(
YaProgramListData::SetProgramData{.instance_id = instance_id(), YaProgramListData::SetProgramData{.instance_id = instance_id(),
.list_id = listId, .list_id = listId,
.program_index = programIndex, .program_index = programIndex,
.data = data}); .data = data});
} else {
bridge.logger.log(
"WARNING: Null pointer passed to "
"'IProgramListData::setProgramData()'");
return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API tresult PLUGIN_API
@@ -638,6 +721,7 @@ 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) {
if (data) {
const GetUnitDataResponse response = const GetUnitDataResponse response =
bridge.send_message(YaUnitData::GetUnitData{ bridge.send_message(YaUnitData::GetUnitData{
.instance_id = instance_id(), .unit_id = unitId}); .instance_id = instance_id(), .unit_id = unitId});
@@ -645,13 +729,24 @@ Vst3PluginProxyImpl::getUnitData(Steinberg::Vst::UnitID 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) {
if (data) {
return bridge.send_message(YaUnitData::SetUnitData{ return bridge.send_message(YaUnitData::SetUnitData{
.instance_id = instance_id(), .unit_id = unitId, .data = data}); .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,6 +787,7 @@ 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*/) {
if (name) {
const GetProgramNameResponse response = bridge.send_message( const GetProgramNameResponse response = bridge.send_message(
YaUnitInfo::GetProgramName{.instance_id = instance_id(), YaUnitInfo::GetProgramName{.instance_id = instance_id(),
.list_id = listId, .list_id = listId,
@@ -701,6 +797,11 @@ Vst3PluginProxyImpl::getProgramName(Steinberg::Vst::ProgramListID listId,
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( const GetProgramInfoResponse response = bridge.send_message(
YaUnitInfo::GetProgramInfo{.instance_id = instance_id(), YaUnitInfo::GetProgramInfo{.instance_id = instance_id(),
.list_id = listId, .list_id = listId,
.program_index = programIndex, .program_index = programIndex,
.attribute_id = attributeId}); .attribute_id = attributeId});
std::copy(response.attribute_value.begin(), response.attribute_value.end(), std::copy(response.attribute_value.begin(),
attributeValue); response.attribute_value.end(), attributeValue);
attributeValue[response.attribute_value.size()] = 0; attributeValue[response.attribute_value.size()] = 0;
return response.result; return response.result;
} else {
bridge.logger.log(
"WARNING: Null pointer passed to 'IUnitInfo::getProgramInfo()'");
return Steinberg::kInvalidArgument;
}
} }
tresult PLUGIN_API tresult PLUGIN_API
@@ -737,6 +842,7 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getProgramPitchName(
int32 programIndex, int32 programIndex,
int16 midiPitch, int16 midiPitch,
Steinberg::Vst::String128 name /*out*/) { Steinberg::Vst::String128 name /*out*/) {
if (name) {
const GetProgramPitchNameResponse response = bridge.send_message( const GetProgramPitchNameResponse response = bridge.send_message(
YaUnitInfo::GetProgramPitchName{.instance_id = instance_id(), YaUnitInfo::GetProgramPitchName{.instance_id = instance_id(),
.list_id = listId, .list_id = listId,
@@ -747,6 +853,12 @@ tresult PLUGIN_API Vst3PluginProxyImpl::getProgramPitchName(
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) {
if (data) {
return bridge.send_message( return bridge.send_message(
YaUnitInfo::SetUnitProgramData{.instance_id = instance_id(), YaUnitInfo::SetUnitProgramData{.instance_id = instance_id(),
.list_or_unit_id = listOrUnitId, .list_or_unit_id = listOrUnitId,
.program_index = programIndex, .program_index = programIndex,
.data = data}); .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