diff options
author | savilli <78875209+savilli@users.noreply.github.com> | 2021-05-24 19:40:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-24 19:40:35 +0200 |
commit | 673c29f7ea6735c15596a118fe7e6100d4a466e0 (patch) | |
tree | 1a3cd4c1edc42b0db35f9038b8a8a9a4f0bd2e29 | |
parent | 93f43c890bf53dcdfccdd87601bea60e43862861 (diff) | |
download | minetest-673c29f7ea6735c15596a118fe7e6100d4a466e0.tar.gz minetest-673c29f7ea6735c15596a118fe7e6100d4a466e0.tar.bz2 minetest-673c29f7ea6735c15596a118fe7e6100d4a466e0.zip |
Fix client crash on when con::PeerNotFoundException is thrown (#11286)
-rw-r--r-- | src/client/clientlauncher.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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()) { |