Prevent garbage preset names with VST plugins when the call to get preset name fails.
git-svn-id: svn://localhost/ardour2/branches/3.0@8245 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
173354c847
commit
680a3f2b86
@ -656,8 +656,11 @@ VSTPlugin::get_presets ()
|
|||||||
|
|
||||||
if (vst_version >= 2) {
|
if (vst_version >= 2) {
|
||||||
char buf[256];
|
char buf[256];
|
||||||
_plugin->dispatcher (_plugin, 29, i, 0, buf, 0);
|
if (_plugin->dispatcher (_plugin, 29, i, 0, buf, 0) == 1) {
|
||||||
r.label = buf;
|
r.label = buf;
|
||||||
|
} else {
|
||||||
|
r.label = string_compose (_("Preset %1"), i);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
r.label = string_compose (_("Preset %1"), i);
|
r.label = string_compose (_("Preset %1"), i);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user