Skip to content

Commit

Permalink
fix #305253: Crash on adding text on a text frame (MS 3.5 Alpha, debu…
Browse files Browse the repository at this point in the history
…g build)

Implemented @dmitrio95's suggestion from https://musescore.org/en/node/305253#comment-998786
  • Loading branch information
anatoly-os committed May 27, 2020
1 parent 27775db commit 18e625b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libmscore/textedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ void TextBase::endEdit(EditData& ed)
newlyAdded = true;
undo->mergeCommands(ted->startUndoIdx - 1);
}
else {
IF_ASSERT_FAILED(parent()) {
return;
}

newlyAdded = (Ms::toTBox(parent()) != nullptr);
}
}

if (actualPlainText.isEmpty()) {
Expand Down

0 comments on commit 18e625b

Please sign in to comment.