From bade953de3d1196028fc58ffaca98b01517650b1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 20 Jan 2013 04:52:42 +0000 Subject: [PATCH] Fix crash on verbose note text in regions with no patch changes. ... I think. Not sure precisely, conditions were fuzzy, I just tortured my mouse button until I could reproduce it. git-svn-id: svn://localhost/ardour2/branches/3.0@13921 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/midi_region_view.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index ec0a426ccb..acd63469c6 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -1865,7 +1865,7 @@ MidiRegionView::get_patch_key_at (double time, uint8_t channel, MIDI::Name::Patc --i; } - if (patch_applies(*i, time, channel)) { + if (i != _model->patch_changes().end() && patch_applies(*i, time, channel)) { key.bank_number = (*i)->bank(); key.program_number = (*i)->program (); } else {