aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTorbjörn Andersson2007-06-22 20:20:34 +0000
committerTorbjörn Andersson2007-06-22 20:20:34 +0000
commit90e11695813db724a4ead1057a4a7c129b94005e (patch)
tree477ebc221b7ca7bb1ad3a939ec31dc8afd615958 /engines
parent2b23374468549722c8068d448d9bbf5e100d7301 (diff)
downloadscummvm-rg350-90e11695813db724a4ead1057a4a7c129b94005e.tar.gz
scummvm-rg350-90e11695813db724a4ead1057a4a7c129b94005e.tar.bz2
scummvm-rg350-90e11695813db724a4ead1057a4a7c129b94005e.zip
Work around a crash when quitting Simon 2. If this is the proper fix, it should
almost certainly go into the 0.10 branch as well. svn-id: r27617
Diffstat (limited to 'engines')
-rw-r--r--engines/agos/agos.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index c77e937947..c98257f028 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -914,7 +914,9 @@ void AGOSEngine::setupGame() {
AGOSEngine::~AGOSEngine() {
// Sync with AGOSEngine::shutdown()
- delete _gameFile;
+ // In Simon 2, this gets deleted along with _sound further down
+ if (getGameType() != GType_SIMON2)
+ delete _gameFile;
_midi.close();
@@ -943,7 +945,7 @@ AGOSEngine::~AGOSEngine() {
delete _dummyItem2;
delete _dummyItem3;
- delete [] _dummyWindow;
+ delete _dummyWindow;
delete [] _windowList;
delete _debugger;
@@ -1046,7 +1048,9 @@ int AGOSEngine::go() {
void AGOSEngine::shutdown() {
// Sync with AGOSEngine::~AGOSEngine()
- delete _gameFile;
+ // In Simon 2, this gets deleted along with _sound further down
+ if (getGameType() != GType_SIMON2)
+ delete _gameFile;
_midi.close();
@@ -1075,7 +1079,7 @@ void AGOSEngine::shutdown() {
delete _dummyItem2;
delete _dummyItem3;
- delete [] _dummyWindow;
+ delete _dummyWindow;
delete [] _windowList;
delete _debugger;