diff options
author | Willem Jan Palenstijn | 2011-11-15 20:59:03 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-11-15 20:59:03 +0100 |
commit | 05c748efa3d42ffb3bfe64770837efd24a9fa29c (patch) | |
tree | 0adb90a3d1db6af3c7a48098bf9cf2166478fce4 /engines | |
parent | 0888e636d7265e2feacc8db972d73f919f7279a6 (diff) | |
download | scummvm-rg350-05c748efa3d42ffb3bfe64770837efd24a9fa29c.tar.gz scummvm-rg350-05c748efa3d42ffb3bfe64770837efd24a9fa29c.tar.bz2 scummvm-rg350-05c748efa3d42ffb3bfe64770837efd24a9fa29c.zip |
DREAMWEB: Fix crash on quit
The functions 'mainscreen' and 'screenupdate' can set kQuitrequested,
so we have to check that from their callers.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 3 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 6643ab0204..ba315f2051 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -13491,6 +13491,9 @@ void DreamGenContext::screenupdate() { STACK_CHECK; newplace(); mainscreen(); + _cmp(data.byte(kQuitrequested), 0); + if (!flags.z()) + return /* (finishearly) */; animpointer(); showpointer(); _cmp(data.word(kWatchingtime), 0); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 97d0f08555..798772168c 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -140,6 +140,9 @@ void DreamGenContext::dreamweb() { screenupdate(); + if (data.byte(kQuitrequested)) + return; // exit game + if (data.byte(kWongame) != 0) { // "endofgame" clearbeforeload(); |