fix potential access to empty stack
This commit is contained in:
parent
0043387f49
commit
52ac6bd741
1 changed files with 1 additions and 1 deletions
|
@ -2432,7 +2432,7 @@ void MenuScreen::stop(int result, bool stopAll)
|
|||
{
|
||||
if (!this->runLoop) {
|
||||
Gui->setTop(this->oldtop);
|
||||
if (MenuStack.top() == this) {
|
||||
if (MenuStack.size() > 0 && MenuStack.top() == this) {
|
||||
MenuStack.pop();
|
||||
} else {
|
||||
DebugPrint("ALARM! A menu we're trying to stop is NOT at the top of the menu stack!!");
|
||||
|
|
Loading…
Add table
Reference in a new issue