From 54d3bf907191b2e6a877622b8a3b17363b09beab Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 19 Nov 2025 10:07:34 -0700 Subject: [PATCH] MidiView: avoid calling ::model_changed() if there is no model The method asserts (_model). We prefer the logic in the caller (at least for now) --- gtk2_ardour/midi_view.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/midi_view.cc b/gtk2_ardour/midi_view.cc index 3eb8ff5aa7..fbb4666f56 100644 --- a/gtk2_ardour/midi_view.cc +++ b/gtk2_ardour/midi_view.cc @@ -207,7 +207,9 @@ void MidiView::note_mode_changed () { clear_events (); - model_changed (); + if (_model) { + model_changed (); + } } void @@ -1141,7 +1143,7 @@ MidiView::redisplay (bool view_only) what_changed.add (Properties::length); region_resized (what_changed); - } else { + } else if (_model) { /* Block calls to update note range at all as we add notes in ::model_changed() */