Skip to content

Commit c4ecc48

Browse files
committed
Fix #311661: Fix potential crash in PianoView::updateNotes()
and in the same way as it is done in `PianoLevels::updateNotes()`and `NoteTweakerDialog::updateNotes()`
1 parent cc225b6 commit c4ecc48

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mscore/pianoroll/pianoview.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,6 +1658,10 @@ void PianoView::updateNotes()
16581658
scene()->clear();
16591659
clearNoteData();
16601660

1661+
if (!_staff) {
1662+
return;
1663+
}
1664+
16611665
int staffIdx = _staff->idx();
16621666
if (staffIdx == -1)
16631667
return;

0 commit comments

Comments
 (0)