GenericUI: add a sanity-check for FileChoosers
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Thu, 28 Jul 2016 18:57:44 +0000 (20:57 +0200)
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Thu, 28 Jul 2016 21:20:04 +0000 (23:20 +0200)
Assert that all FileChooserButton created are for properties, because
the remaining code assumes that it should setup things for a property.

gtk2_ardour/generic_pluginui.cc

index dc19aca19ed90e5018cb525751e5c294415f7f32..77a2536b1adde1085f5b40b832e32afa41459c5d 100644 (file)
@@ -665,6 +665,9 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter&             param,
 
                if (desc.datatype == Variant::PATH) {
 
+                       /* We shouldn't get that type for input ports */
+                       assert(param.type() == PluginPropertyAutomation);
+
                        /* Build a file selector button */
 
                        // Create/add controller