diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index 6615133dea7b..2a6fe808ddf4 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -273,6 +273,10 @@ void EditorLog::_undo_redo_cbk(void *p_self, const String &p_name) { } void EditorLog::_rebuild_log() { + if (messages.is_empty()) { + return; + } + log->clear(); int line_count = 0;