From 6c62392fb07160cccfcb1c1eccd6ed44819647c7 Mon Sep 17 00:00:00 2001 From: Christian Kaiser Date: Sun, 19 May 2024 14:55:43 -0300 Subject: [PATCH] Fixed log rebuilding crashing when there's no messages --- editor/editor_log.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index 6615133dea7..2a6fe808ddf 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;