diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc index ca9fd27149..99969e1b61 100644 --- a/gtk2_ardour/generic_pluginui.cc +++ b/gtk2_ardour/generic_pluginui.cc @@ -527,7 +527,12 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptrlogarithmic) { - 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)); }