Ensure game is shutdown if server throws exception (#9742)
authorPaul Ouellette <oue.paul18@gmail.com>
Sat, 25 Apr 2020 07:42:18 +0000 (03:42 -0400)
committerGitHub <noreply@github.com>
Sat, 25 Apr 2020 07:42:18 +0000 (09:42 +0200)
src/client/game.cpp

index 610522dc2ffba57143a07c07777bfabc17adea2b..3bdac786c02aea26d8ab05cf185110a8f02c0f42 100644 (file)
@@ -4284,7 +4284,6 @@ void the_game(bool *kill,
                                reconnect_requested, &chat_backend, gamespec,
                                simple_singleplayer_mode)) {
                        game.run();
-                       game.shutdown();
                }
 
        } catch (SerializationError &e) {
@@ -4300,4 +4299,5 @@ void the_game(bool *kill,
                                strgettext("\nCheck debug.txt for details.");
                errorstream << error_message << std::endl;
        }
+       game.shutdown();
 }