1
0
forked from 0ad/0ad

Fix memory leak when loading mods from config.

This was SVN commit r15818.
This commit is contained in:
leper 2014-09-28 00:13:55 +00:00
parent e07305fd9f
commit 857698e231

View File

@ -583,8 +583,6 @@ static void ShutdownPs()
SAFE_DELETE(g_GUI);
UnloadHotkeys();
SAFE_DELETE(g_Console);
// disable the special Windows cursor, or free textures for OGL cursors
cursor_draw(g_VFS, 0, g_mouse_x, g_yres-g_mouse_y, false);
@ -739,6 +737,8 @@ from_config:
delete &g_ConfigDB;
TIMER_END(L"shutdown ConfigDB");
SAFE_DELETE(g_Console);
// This is needed to ensure that no callbacks from the JSAPI try to use
// the profiler when it's already destructed
g_ScriptRuntime.reset();