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 <vector>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <IGUIEnvironment.h>
|
||||||
|
|
||||||
using namespace GUIEngine;
|
using namespace GUIEngine;
|
||||||
|
|
||||||
@ -212,15 +212,17 @@ void AbstractStateManager::popMenu()
|
|||||||
{
|
{
|
||||||
assert(m_game_mode != GAME);
|
assert(m_game_mode != GAME);
|
||||||
|
|
||||||
if (m_menu_stack.size() == 0)
|
if (m_menu_stack.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Send tear-down event to menu
|
// Send tear-down event to menu
|
||||||
getCurrentScreen()->tearDown();
|
getCurrentScreen()->tearDown();
|
||||||
m_menu_stack.pop_back();
|
m_menu_stack.pop_back();
|
||||||
|
|
||||||
if (m_menu_stack.size() == 0)
|
if (m_menu_stack.empty())
|
||||||
{
|
{
|
||||||
|
getGUIEnv()->clear();
|
||||||
|
getCurrentScreen()->elementsWereDeleted();
|
||||||
onStackEmptied();
|
onStackEmptied();
|
||||||
return;
|
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…
x
Reference in New Issue
Block a user