More complete (but still incomplete) LV2 persist implementation.
[ardour.git] / libs / ardour / vst_plugin.cc
index 26b3ce78f60fbc55816c3ec678df1e3d20b6201d..e77fc483ed0fd2e6155c1718fe76f2c08622b8f7 100644 (file)
@@ -656,8 +656,11 @@ VSTPlugin::get_presets ()
                
                if (vst_version >= 2) {
                        char buf[256];
-                       _plugin->dispatcher (_plugin, 29, i, 0, buf, 0);
-                       r.label = buf;
+                       if (_plugin->dispatcher (_plugin, 29, i, 0, buf, 0) == 1) {
+                               r.label = buf;
+                       } else {
+                               r.label = string_compose (_("Preset %1"), i);
+                       }
                } else {
                        r.label = string_compose (_("Preset %1"), i);
                }