Merge pull request #92426 from RandomShaper/fix_ed_toast_mt

Avoid editor error reporting using resource loader thread's call queues
This commit is contained in:
Rémi Verschelde
2024-06-03 11:20:50 +02:00
committed by GitHub
3 changed files with 4 additions and 3 deletions

View File

@@ -406,7 +406,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).bind(p_message, p_severity, p_tooltip));
is_processing_error = false;
}