diff options
author | Julien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr> | 2016-07-28 23:50:33 +0200 |
---|---|---|
committer | Julien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr> | 2016-07-29 00:07:02 +0200 |
commit | a7b29d79668dfe24b3b07b4bc100d5bdc439cee3 (patch) | |
tree | e0bb5a9f4bd4fffd231cff478e7c118849dd6034 /gtk2_ardour | |
parent | 3365722b8b5f3ed17b53d1e9492a4bec22db3a62 (diff) |
GenericUI: replace if() by assert()
It makes no sense to check for the validity of mcontrol only for
controller creation, since the remainder of the code assumes that the
controller will have been created correctly.
Replace that by an assert.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/generic_pluginui.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc index ddaba074ce..1f7b94129e 100644 --- a/gtk2_ardour/generic_pluginui.cc +++ b/gtk2_ardour/generic_pluginui.cc @@ -696,6 +696,7 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param, return control_ui; } + assert(mcontrol); /* See if there any named values for our input value */ control_ui->scale_points = desc.scale_points; @@ -744,9 +745,7 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param, * destructor, and manage() reports object hierarchy * ambiguity. */ - if (mcontrol) { - control_ui->controller = AutomationController::create(insert, mcontrol->parameter(), desc, mcontrol, use_knob); - } + control_ui->controller = AutomationController::create(insert, mcontrol->parameter(), desc, mcontrol, use_knob); /* XXX this code is not right yet, because it doesn't handle the absence of bounds in any sensible fashion. |