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
This commit is contained in:
Torbjörn Andersson 2007-06-22 20:20:34 +00:00
parent 2b23374468
commit 90e1169581

View File

@ -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;