Skip to content

Commit

Permalink
Merge pull request #82244 from SaracenOne/fix_dependency_error_popup
Browse files Browse the repository at this point in the history
Fix missing dependency warning popup
  • Loading branch information
akien-mga committed Sep 26, 2023
2 parents 42011d8 + 0b0a610 commit 666a92c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/io/resource_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,11 @@ class ResourceLoader {
// 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) {
Expand Down

0 comments on commit 666a92c

Please sign in to comment.