BASE: Only clear debug channels after destructing the engine object in runGame.

This should fix missing debugC output when the engine object uses debugC etc.
in its destructor (or functions called from there).
In theory all the engines should do that themselves, but to avoid any issues
because of them not doing it we still do it here to be safe.

svn-id: r54757
This commit is contained in:
Johannes Schickel 2010-12-04 02:50:27 +00:00
parent 5884f5a7ac
commit 16483fcf34

View File

@ -220,12 +220,12 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const
// Inform backend that the engine finished
system.engineDone();
// We clear all debug levels again even though the engine should do it
DebugMan.clearAllDebugChannels();
// Free up memory
delete engine;
// We clear all debug levels again even though the engine should do it
DebugMan.clearAllDebugChannels();
// Reset the file/directory mappings
SearchMan.clear();