13
0

avoid delivering NaN's when setting up a generic plugin UI

git-svn-id: svn://localhost/ardour2/branches/3.0@8116 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-11-28 18:29:21 +00:00
parent 785478b251
commit 422309880c

View File

@ -527,7 +527,12 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat
}
if (control_ui->logarithmic) {
adj->set_value(log(plugin->get_parameter(port_index)));
double val = plugin->get_parameter (port_index);
if (isnan (val) || val <= 0.0) {
adj->set_value (0.0);
} else {
adj->set_value (log(val));
}
} else{
adj->set_value(plugin->get_parameter(port_index));
}