Fix game crash when user click on Cancel while connecting to add-ons server from multiplayer lobby

Fixes issue #3859

(cherry picked from commit 856183067f)
This commit is contained in:
Martin Hrubý 2019-02-23 14:31:23 +01:00 committed by Wedge009
parent 14c0272948
commit 1b24c3ab8e

View file

@ -36,6 +36,7 @@
#include "gui/widgets/toggle_panel.hpp"
#include "gui/widgets/tree_view_node.hpp"
#include "addon/client.hpp"
#include "addon/manager_ui.hpp"
#include "chat_log.hpp"
#include "font/text_formatting.hpp"
@ -242,7 +243,11 @@ bool handle_addon_requirements_gui(const std::vector<mp::game_info::required_add
if(gui2::show_message(e_title, err_msg, message::yes_no_buttons, true) == gui2::retval::OK) {
// Begin download session
return ad_hoc_addon_fetch_session(needs_download);
try {
return ad_hoc_addon_fetch_session(needs_download);
} catch (const addons_client::user_exit&) {
} catch (const addons_client::user_disconnect&) {
}
}
}