Merge pull request #93042 from kitbdev/dont-error-when-empty

TextEdit: Don't error when undo stack is empty
This commit is contained in:
Rémi Verschelde 2024-06-12 10:00:47 +02:00
commit e0965f5ad9
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -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) {