Defer banner actions to not crash upon restart

This commit is contained in:
Serhii Snitsaruk 2024-07-06 12:13:58 +02:00
parent 5f5e4a28cc
commit f1af947060
No known key found for this signature in database
GPG Key ID: A965EF8799FFEC2D
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ void ActionBanner::close() {
void ActionBanner::add_action(const String &p_name, const Callable &p_action, bool p_auto_close) {
Button *action_btn = memnew(Button);
action_btn->set_text(p_name);
action_btn->connect(LW_NAME(pressed), callable_mp(this, &ActionBanner::_execute_action).bind(p_action, p_auto_close));
action_btn->connect(LW_NAME(pressed), callable_mp(this, &ActionBanner::_execute_action).bind(p_action, p_auto_close), CONNECT_DEFERRED);
hbox->add_child(action_btn);
}