diff options
author | Paul Gilbert | 2017-11-24 16:56:29 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-11-24 16:56:29 -0500 |
commit | 5bd0d25c42244bec026fbe141dd74cae02f01400 (patch) | |
tree | 5d520023b9d03c6fb5dc2c340bec84f8d138837d | |
parent | b1f21cd7687ce9234f93f00abf1358632049f003 (diff) | |
download | scummvm-rg350-5bd0d25c42244bec026fbe141dd74cae02f01400.tar.gz scummvm-rg350-5bd0d25c42244bec026fbe141dd74cae02f01400.tar.bz2 scummvm-rg350-5bd0d25c42244bec026fbe141dd74cae02f01400.zip |
XEEN: Fix crash exiting game whilst town actions are active
-rw-r--r-- | engines/xeen/town.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/xeen/town.cpp b/engines/xeen/town.cpp index 02e0990e96..0e2f2e71d3 100644 --- a/engines/xeen/town.cpp +++ b/engines/xeen/town.cpp @@ -244,10 +244,13 @@ int Town::townAction(TownAction actionId) { do { townWait(); charP = doTownOptions(charP); + if (_vm->shouldQuit()) + return 0; + title = createTownText(*charP); screen._windows[10].writeString(title); drawButtons(&screen); - } while (!_vm->shouldQuit() && _buttonValue != Common::KEYCODE_ESCAPE); + } while (_buttonValue != Common::KEYCODE_ESCAPE); switch (actionId) { case BLACKSMITH: |