diff --git a/gtk2_ardour/midi_view.cc b/gtk2_ardour/midi_view.cc index e5c6fcd998..e319c4d1c8 100644 --- a/gtk2_ardour/midi_view.cc +++ b/gtk2_ardour/midi_view.cc @@ -2196,7 +2196,7 @@ MidiView::remove_canvas_patch_change (PatchChange* pc) { /* remove the canvas item */ for (PatchChanges::iterator x = _patch_changes.begin(); x != _patch_changes.end(); ++x) { - if (x->second->patch() == pc->patch()) { + if (x->first == pc->patch()) { _patch_changes.erase (x); break; }