aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Turner2010-09-22 20:05:10 +0000
committerDavid Turner2010-09-22 20:05:10 +0000
commit4b7a9b29fe36a47e7071b6980378a11f31ca9b96 (patch)
tree2551be5b445821cf1cfc9d4d06502fb599b783dd
parentb11263be90c72619bb360d64d7d06ffcd8addd20 (diff)
downloadscummvm-rg350-4b7a9b29fe36a47e7071b6980378a11f31ca9b96.tar.gz
scummvm-rg350-4b7a9b29fe36a47e7071b6980378a11f31ca9b96.tar.bz2
scummvm-rg350-4b7a9b29fe36a47e7071b6980378a11f31ca9b96.zip
AGI: Fix for Bug #3067263 "SQ2: ScummVM hanging on the inventory screen"
This was due to a loop in AgiEngine::selectItems(int n), which lacked a check that the engine was quitting or restarting. svn-id: r52856
-rw-r--r--engines/agi/inv.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/agi/inv.cpp b/engines/agi/inv.cpp
index da56449fda..46dfcb2b43 100644
--- a/engines/agi/inv.cpp
+++ b/engines/agi/inv.cpp
@@ -114,7 +114,7 @@ void AgiEngine::selectItems(int n) {
int fsel = 0;
bool exit_select = false;
- while (!exit_select) {
+ while (!exit_select && !(shouldQuit() || _restartGame)) {
if (n > 0)
printItem(fsel, STATUS_BG, STATUS_FG);