Skip to content

Commit

Permalink
Fix to stop tests crashing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Obliquely committed May 21, 2019
1 parent 4f1e9c7 commit 3e43eb7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mscore/musescore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4140,7 +4140,10 @@ void MuseScore::changeState(ScoreState val)
if (getAction("split-measure")->isEnabled())
getAction("split-measure")->setEnabled(cs && cs->masterScore()->excerpts().size() == 0);

getAction("edit-toolbars")->setEnabled(!Workspace::currentWorkspace->readOnly());
Workspace* currentWorkspace = Workspace::currentWorkspace;
if (currentWorkspace) {
getAction("edit-toolbars")->setEnabled(!currentWorkspace->readOnly());
}

//getAction("split-measure")->setEnabled(cs->masterScore()->excerpts().size() == 0);

Expand Down

0 comments on commit 3e43eb7

Please sign in to comment.