From 5afce4b8ba62b1ee2f978d7f7e0f15b057302296 Mon Sep 17 00:00:00 2001 From: Dmitri Ovodok Date: Wed, 26 Sep 2018 14:47:21 +0200 Subject: [PATCH] Fix a crash on click on key signature in new file wizard if there are no scores opened --- mscore/palette.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mscore/palette.cpp b/mscore/palette.cpp index 08942bd22b..1671257549 100644 --- a/mscore/palette.cpp +++ b/mscore/palette.cpp @@ -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)