aboutsummaryrefslogtreecommitdiff
path: root/base/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'base/main.cpp')
-rw-r--r--base/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/base/main.cpp b/base/main.cpp
index f4cd2a531e..2437e85897 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -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();