Skip to content

Commit

Permalink
Fix game crash when user click on Cancel while connecting to add-ons …
Browse files Browse the repository at this point in the history
…server from multiplayer lobby

Fixes issue #3859

(cherry picked from commit 8561830)
  • Loading branch information
hrubymar10 authored and Wedge009 committed Sep 13, 2019
1 parent 14c0272 commit 1b24c3a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gui/dialogs/multiplayer/lobby.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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&) {
}
}
}

Expand Down

0 comments on commit 1b24c3a

Please sign in to comment.