From 80a34fc3ece6fb5d04fd8dc52308e0070940176c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 4 Jun 2025 20:41:29 -0600 Subject: [PATCH] stop crash from adding a note in a region also shown in an invisible pianoroll if the height of the pianoroll has not been set, we can't do the math for the note range display. --- gtk2_ardour/midi_view_background.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk2_ardour/midi_view_background.cc b/gtk2_ardour/midi_view_background.cc index 119f45ffb0..51703dcbad 100644 --- a/gtk2_ardour/midi_view_background.cc +++ b/gtk2_ardour/midi_view_background.cc @@ -270,6 +270,10 @@ MidiViewBackground::maybe_apply_note_range (uint8_t lowest, uint8_t highest, boo void MidiViewBackground::apply_note_range (uint8_t lowest, uint8_t highest, bool to_children) { + if (contents_height() == 0) { + return; + } + bool changed = false; /* Enforce a 1 octave minimum */