Skip to content

Commit

Permalink
Fix #311661: Fix potential crash in PianoView::updateNotes()
Browse files Browse the repository at this point in the history
and in the same way as it is done in PianoLevels::updateNotes()and
NoteTweakerDialog::updateNotes()
  • Loading branch information
Jojo-Schmitz authored and igorkorsukov committed Oct 19, 2020
1 parent af1ab0f commit 51b720e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mscore/pianoroll/pianoview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1628,6 +1628,10 @@ void PianoView::updateNotes()
scene()->clear();
clearNoteData();

if (!_staff) {
return;
}

int staffIdx = _staff->idx();
if (staffIdx == -1) {
return;
Expand Down

0 comments on commit 51b720e

Please sign in to comment.