Fix a crash on click on key signature in new file wizard if there are no scores opened

This commit is contained in:
Dmitri Ovodok 2018-09-26 14:47:21 +02:00
parent 59594beec6
commit 5afce4b8ba

View file

@ -325,7 +325,7 @@ void Palette::mousePressEvent(QMouseEvent* ev)
// Take out of edit mode to prevent crashes when adding
// elements from palette
ScoreView* cv = mscore->currentScoreView();
if (cv->editMode())
if (cv && cv->editMode())
cv->changeState(ViewState::NORMAL);
if (dragIdx == -1)