diff options
author | Xavier Sellier <contact@binogure-studio.com> | 2021-12-14 13:42:46 +0100 |
---|---|---|
committer | Xavier Sellier <contact@binogure-studio.com> | 2021-12-14 20:08:19 +0100 |
commit | ba0abd399fe9c7289e1def7ec7ccf253ea45a5a9 (patch) | |
tree | 8230b9766a2f034921193379f4a4c36ddeac0f41 /core/error | |
parent | 15aea89868d16d0310a229d831e4a347a38dc1c3 (diff) |
Defer the call to 'popup_str' to the next cycle to let Godot Engine's editor time to properly start
Diffstat (limited to 'core/error')
-rw-r--r-- | core/error/error_macros.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/error/error_macros.cpp b/core/error/error_macros.cpp index 61bb949ed4..c236f30945 100644 --- a/core/error/error_macros.cpp +++ b/core/error/error_macros.cpp @@ -37,9 +37,16 @@ static ErrorHandlerList *error_handler_list = nullptr; void add_error_handler(ErrorHandlerList *p_handler) { + // If p_handler is already in error_handler_list + // we'd better remove it first then we can add it. + // This prevent cyclic redundancy. + remove_error_handler(p_handler); + _global_lock(); + p_handler->next = error_handler_list; error_handler_list = p_handler; + _global_unlock(); } |