diff options
author | Vicent Marti | 2008-10-14 23:42:54 +0000 |
---|---|---|
committer | Vicent Marti | 2008-10-14 23:42:54 +0000 |
commit | cf81446338577de33da78a7e67a58da101ac6278 (patch) | |
tree | 5611c159b0235c613dcc0efc8271644ffaa3348c | |
parent | 61b04725a1858d59bab48f95120c91129eaa7fc1 (diff) | |
download | scummvm-rg350-cf81446338577de33da78a7e67a58da101ac6278.tar.gz scummvm-rg350-cf81446338577de33da78a7e67a58da101ac6278.tar.bz2 scummvm-rg350-cf81446338577de33da78a7e67a58da101ac6278.zip |
Fixed: Freddi 1/2 ingame menu crash (BUG 2167027).
Was: Crash when refreshing the screen with no open dialogs.
svn-id: r34805
-rw-r--r-- | gui/newgui.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gui/newgui.cpp b/gui/newgui.cpp index e7e5fcf785..4aaf65bcab 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -142,6 +142,9 @@ void NewGui::redraw() { if (_redrawStatus == kRedrawDisabled) return; + + if (_dialogStack.empty()) + return; switch (_redrawStatus) { case kRedrawCloseDialog: @@ -331,7 +334,7 @@ void NewGui::restoreState() { _stateIsSaved = false; } -void NewGui::openDialog(Dialog *dialog) { +void NewGui::openDialog(Dialog *dialog) { _dialogStack.push(dialog); _redrawStatus = kRedrawOpenDialog; |