diff options
Diffstat (limited to 'engines/agi/agi.cpp')
-rw-r--r-- | engines/agi/agi.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index 81aec3e351..9d88dd73ef 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -62,9 +62,7 @@ void AgiEngine::processEvents() { while (_eventMan->pollEvent(event)) { switch (event.type) { case Common::EVENT_QUIT: - _gfx->deinitVideo(); - _gfx->deinitMachine(); - _system->quit(); + _game.quitProgNow = true; break; case Common::EVENT_PREDICTIVE_DIALOG: if (_predictiveDialogRunning) @@ -766,12 +764,15 @@ AgiEngine::~AgiEngine() { } agiDeinit(); + delete _loader; _sound->deinitSound(); delete _sound; _gfx->deinitVideo(); delete _sprites; + delete _picture; free(_game.sbufOrig); _gfx->deinitMachine(); + delete _gfx; delete _rnd; delete _console; |