From 2d39bfaa57f447919715deb81e97029bfe4502f7 Mon Sep 17 00:00:00 2001 From: Mikael Hermansson Date: Wed, 21 May 2025 13:10:57 +0200 Subject: [PATCH] Fix print/error ordering issue in editor Output --- editor/editor_node.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index dca54eb0283..bb4000e7b11 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -7014,7 +7014,11 @@ static Node *_resource_get_edited_scene() { } void EditorNode::_print_handler(void *p_this, const String &p_string, bool p_error, bool p_rich) { - callable_mp_static(&EditorNode::_print_handler_impl).call_deferred(p_string, p_error, p_rich); + if (!Thread::is_main_thread()) { + callable_mp_static(&EditorNode::_print_handler_impl).call_deferred(p_string, p_error, p_rich); + } else { + _print_handler_impl(p_string, p_error, p_rich); + } } void EditorNode::_print_handler_impl(const String &p_string, bool p_error, bool p_rich) {