Fix crash if top screen is networking lobby --connect-now
This commit is contained in:
parent
1994fba62b
commit
ecc0007b29
@ -28,7 +28,7 @@
|
||||
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
#include <IGUIEnvironment.h>
|
||||
|
||||
using namespace GUIEngine;
|
||||
|
||||
@ -212,15 +212,17 @@ void AbstractStateManager::popMenu()
|
||||
{
|
||||
assert(m_game_mode != GAME);
|
||||
|
||||
if (m_menu_stack.size() == 0)
|
||||
if (m_menu_stack.empty())
|
||||
return;
|
||||
|
||||
// Send tear-down event to menu
|
||||
getCurrentScreen()->tearDown();
|
||||
m_menu_stack.pop_back();
|
||||
|
||||
if (m_menu_stack.size() == 0)
|
||||
if (m_menu_stack.empty())
|
||||
{
|
||||
getGUIEnv()->clear();
|
||||
getCurrentScreen()->elementsWereDeleted();
|
||||
onStackEmptied();
|
||||
return;
|
||||
}
|
||||
|
0
src/states_screens/race_result_gui.cpp
Executable file → Normal file
0
src/states_screens/race_result_gui.cpp
Executable file → Normal file
Loading…
Reference in New Issue
Block a user