Skip to content

Commit 673c29f

Browse files
authoredMay 24, 2021
Fix client crash on when con::PeerNotFoundException is thrown (#11286)
1 parent 93f43c8 commit 673c29f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
 

Diff for: ‎src/client/clientlauncher.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -277,14 +277,6 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
277277
chat_backend,
278278
&reconnect_requested
279279
);
280-
m_rendering_engine->get_scene_manager()->clear();
281-
282-
#ifdef HAVE_TOUCHSCREENGUI
283-
delete g_touchscreengui;
284-
g_touchscreengui = NULL;
285-
receiver->m_touchscreengui = NULL;
286-
#endif
287-
288280
} //try
289281
catch (con::PeerNotFoundException &e) {
290282
error_message = gettext("Connection error (timed out?)");
@@ -300,6 +292,14 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
300292
}
301293
#endif
302294

295+
m_rendering_engine->get_scene_manager()->clear();
296+
297+
#ifdef HAVE_TOUCHSCREENGUI
298+
delete g_touchscreengui;
299+
g_touchscreengui = NULL;
300+
receiver->m_touchscreengui = NULL;
301+
#endif
302+
303303
// If no main menu, show error and exit
304304
if (skip_main_menu) {
305305
if (!error_message.empty()) {

0 commit comments

Comments
 (0)
Please sign in to comment.