Skip to content

Commit

Permalink
Merge pull request #93042 from kitbdev/dont-error-when-empty
Browse files Browse the repository at this point in the history
TextEdit: Don't error when undo stack is empty
  • Loading branch information
akien-mga committed Jun 12, 2024
2 parents e78db2c + 630d3eb commit e0965f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scene/gui/text_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3907,7 +3907,9 @@ void TextEdit::end_complex_operation() {
if (complex_operation_count > 0) {
return;
}
ERR_FAIL_COND(undo_stack.is_empty());
if (undo_stack.is_empty()) {
return;
}

undo_stack.back()->get().end_carets = carets;
if (undo_stack.back()->get().chain_forward) {
Expand Down

0 comments on commit e0965f5

Please sign in to comment.