From d73ebc59483a6d49d86792d6e7eb2c32cc723239 Mon Sep 17 00:00:00 2001 From: Gergely Kis Date: Thu, 30 Jan 2025 11:05:59 +0100 Subject: [PATCH] EditorToaster::popup_str() must always defer to the main MessageQueue This change is required, because the implementation of call_deferred() no longer ensures this behaviour: if a MessageQueue is created on a thread, then that is used instead of the main MessageQueue. --- editor/gui/editor_toaster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/gui/editor_toaster.cpp b/editor/gui/editor_toaster.cpp index 60f02ccfd4..a05f8f5d39 100644 --- a/editor/gui/editor_toaster.cpp +++ b/editor/gui/editor_toaster.cpp @@ -412,7 +412,7 @@ void EditorToaster::popup_str(const String &p_message, Severity p_severity, cons // Since "_popup_str" adds nodes to the tree, and since the "add_child" method is not // thread-safe, it's better to defer the call to the next cycle to be thread-safe. is_processing_error = true; - callable_mp(this, &EditorToaster::_popup_str).call_deferred(p_message, p_severity, p_tooltip); + MessageQueue::get_main_singleton()->push_callable(callable_mp(this, &EditorToaster::_popup_str), p_message, p_severity, p_tooltip); is_processing_error = false; }