Merge pull request #82244 from SaracenOne/fix_dependency_error_popup

Fix missing dependency warning popup
This commit is contained in:
Rémi Verschelde 2023-09-26 13:45:23 +02:00
commit 666a92c7c2
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -230,7 +230,11 @@ public:
// Loaders can safely use this regardless which thread they are running on.
static void notify_dependency_error(const String &p_path, const String &p_dependency, const String &p_type) {
if (dep_err_notify) {
callable_mp_static(dep_err_notify).bind(p_path, p_dependency, p_type).call_deferred();
if (Thread::get_caller_id() == Thread::get_main_id()) {
dep_err_notify(p_path, p_dependency, p_type);
} else {
callable_mp_static(dep_err_notify).bind(p_path, p_dependency, p_type).call_deferred();
}
}
}
static void set_dependency_error_notify_func(DependencyErrorNotify p_err_notify) {