From 673c29f7ea6735c15596a118fe7e6100d4a466e0 Mon Sep 17 00:00:00 2001 From: savilli <78875209+savilli@users.noreply.github.com> Date: Mon, 24 May 2021 19:40:35 +0200 Subject: Fix client crash on when con::PeerNotFoundException is thrown (#11286) --- src/client/clientlauncher.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/client') diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp index 6db5f2e70..dbf1d1cd1 100644 --- a/src/client/clientlauncher.cpp +++ b/src/client/clientlauncher.cpp @@ -277,14 +277,6 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args) chat_backend, &reconnect_requested ); - m_rendering_engine->get_scene_manager()->clear(); - -#ifdef HAVE_TOUCHSCREENGUI - delete g_touchscreengui; - g_touchscreengui = NULL; - receiver->m_touchscreengui = NULL; -#endif - } //try catch (con::PeerNotFoundException &e) { error_message = gettext("Connection error (timed out?)"); @@ -300,6 +292,14 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args) } #endif + m_rendering_engine->get_scene_manager()->clear(); + +#ifdef HAVE_TOUCHSCREENGUI + delete g_touchscreengui; + g_touchscreengui = NULL; + receiver->m_touchscreengui = NULL; +#endif + // If no main menu, show error and exit if (skip_main_menu) { if (!error_message.empty()) { -- cgit v1.2.3