Browse Source

Fixed log rebuilding crashing when there's no messages

Christian Kaiser 1 year ago
parent
commit
6c62392fb0
1 changed files with 4 additions and 0 deletions
  1. 4 0
      editor/editor_log.cpp

+ 4 - 0
editor/editor_log.cpp

@@ -273,6 +273,10 @@ void EditorLog::_undo_redo_cbk(void *p_self, const String &p_name) {
 }
 }
 
 
 void EditorLog::_rebuild_log() {
 void EditorLog::_rebuild_log() {
+	if (messages.is_empty()) {
+		return;
+	}
+
 	log->clear();
 	log->clear();
 
 
 	int line_count = 0;
 	int line_count = 0;