diff --git a/src/gui/dialogs/multiplayer/faction_select.cpp b/src/gui/dialogs/multiplayer/faction_select.cpp index e260327f4e7b..0e9978c5b5f8 100644 --- a/src/gui/dialogs/multiplayer/faction_select.cpp +++ b/src/gui/dialogs/multiplayer/faction_select.cpp @@ -53,11 +53,19 @@ faction_select::faction_select(ng::flg_manager& flg_manager, const std::string& , last_faction_(flg_manager.current_faction_index()) , last_leader_(flg_manager.current_leader_index()) , last_gender_(flg_manager.current_gender_index()) + , w_(nullptr) { } +void faction_select::cancel() +{ + if(w_) { + w_->set_retval(retval::CANCEL); + } +} void faction_select::pre_show(window& window) { + w_ = &window; find_widget