Don't assume patch-banks are populated.
This commit is contained in:
parent
1ef1734e76
commit
6ce9efb11d
@ -1133,9 +1133,13 @@ MidiTimeAxisView::build_patch_menu()
|
||||
if (!channel_name_set) {
|
||||
continue;
|
||||
}
|
||||
const ChannelNameSet::PatchBanks& patch_banks = channel_name_set->patch_banks();
|
||||
if (patch_banks.size () == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Gtk::Menu& chan_menu = *manage(new Gtk::Menu());
|
||||
|
||||
const ChannelNameSet::PatchBanks& patch_banks = channel_name_set->patch_banks();
|
||||
if (patch_banks.size() > 1) {
|
||||
|
||||
for (ChannelNameSet::PatchBanks::const_iterator bank = patch_banks.begin();
|
||||
|
@ -82,7 +82,7 @@ PatchChange::initialize_popup_menus()
|
||||
|
||||
boost::shared_ptr<ChannelNameSet> channel_name_set = _info.get_patches (_patch->channel());
|
||||
|
||||
if (!channel_name_set) {
|
||||
if (!channel_name_set || channel_name_set->patch_banks().size () == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user