From 78a59db334ba8c4d64a5cf369c1394750a6fc1e1 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 11 Dec 2025 11:43:34 -0700 Subject: [PATCH] tweak detection of correct MIDI patch change when removing the canvas item in a MidiView --- gtk2_ardour/midi_view.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }