13
0

Add checks for supported variant types

Add checks for supported variant types in 'build_control_ui'.
This commit is contained in:
Hanspeter Portner 2016-12-20 09:12:38 +01:00 committed by Paul Davis
parent 1fbc9aaa69
commit 00ed7c81d3

View File

@ -702,6 +702,13 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
return control_ui;
}
if (desc.datatype != Variant::INT && desc.datatype != Variant::LONG &&
desc.datatype != Variant::FLOAT && desc.datatype != Variant::DOUBLE &&
desc.datatype != Variant::BOOL) {
/* unsupported variant type */
return control_ui;
}
assert(mcontrol);
/* See if there any named values for our input value */
@ -864,6 +871,13 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param,
} else {
if (desc.datatype != Variant::INT && desc.datatype != Variant::LONG &&
desc.datatype != Variant::FLOAT && desc.datatype != Variant::DOUBLE &&
desc.datatype != Variant::BOOL) {
/* unsupported variant type */
return control_ui;
}
control_ui->display = manage (new EventBox);
control_ui->display->set_name ("ParameterValueDisplay");