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)
This commit is contained in:
Paul Davis 2025-11-19 10:07:34 -07:00
parent db364a6db1
commit 54d3bf9071

View file

@ -207,7 +207,9 @@ void
MidiView::note_mode_changed () MidiView::note_mode_changed ()
{ {
clear_events (); clear_events ();
model_changed (); if (_model) {
model_changed ();
}
} }
void void
@ -1141,7 +1143,7 @@ MidiView::redisplay (bool view_only)
what_changed.add (Properties::length); what_changed.add (Properties::length);
region_resized (what_changed); region_resized (what_changed);
} else { } else if (_model) {
/* Block calls to update note range at all as we add notes in /* Block calls to update note range at all as we add notes in
::model_changed() ::model_changed()
*/ */