فهرست منبع

Don't error when undo stack is empty

kit 1 سال پیش
والد
کامیت
630d3eb35e
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      scene/gui/text_edit.cpp

+ 3 - 1
scene/gui/text_edit.cpp

@@ -3907,7 +3907,9 @@ void TextEdit::end_complex_operation() {
 	if (complex_operation_count > 0) {
 	if (complex_operation_count > 0) {
 		return;
 		return;
 	}
 	}
-	ERR_FAIL_COND(undo_stack.is_empty());
+	if (undo_stack.is_empty()) {
+		return;
+	}
 
 
 	undo_stack.back()->get().end_carets = carets;
 	undo_stack.back()->get().end_carets = carets;
 	if (undo_stack.back()->get().chain_forward) {
 	if (undo_stack.back()->get().chain_forward) {