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.
This commit is contained in:
Paul Davis 2025-06-04 20:41:29 -06:00
parent baa855d3a0
commit 80a34fc3ec

View file

@ -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 */