diff --git a/src/states_screens/race_result_gui.cpp b/src/states_screens/race_result_gui.cpp index 95d544994..b0a874cb7 100644 --- a/src/states_screens/race_result_gui.cpp +++ b/src/states_screens/race_result_gui.cpp @@ -30,6 +30,7 @@ #include "guiengine/message_queue.hpp" #include "guiengine/modaldialog.hpp" #include "guiengine/scalable_font.hpp" +#include "guiengine/screen_keyboard.hpp" #include "guiengine/widget.hpp" #include "guiengine/widgets/icon_button_widget.hpp" #include "guiengine/widgets/label_widget.hpp" @@ -468,9 +469,13 @@ void RaceResultGUI::backToLobby() race_manager->exitRace(); race_manager->setAIKartOverride(""); GUIEngine::ModalDialog::dismiss(); + GUIEngine::ScreenKeyboard::dismiss(); cleanupGPProgress(); - StateManager::get()->resetAndSetStack( - NetworkConfig::get()->getResetScreens(true/*lobby*/).data()); + if (GUIEngine::getCurrentScreen() != NetworkingLobby::getInstance()) + { + StateManager::get()->resetAndSetStack( + NetworkConfig::get()->getResetScreens(true/*lobby*/).data()); + } } // backToLobby //-----------------------------------------------------------------------------