diff options
Diffstat (limited to 'plugins/MirLua/src/mlua.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp index c90d120006..c73d259cf9 100644 --- a/plugins/MirLua/src/mlua.cpp +++ b/plugins/MirLua/src/mlua.cpp @@ -2,12 +2,16 @@ CMLua::CMLua() : L(NULL)
{
+ console = new CMLuaConsole(L);
+
Load();
}
CMLua::~CMLua()
{
Unload();
+
+ delete console;
}
void CMLua::Load()
@@ -25,15 +29,12 @@ void CMLua::Load() MUUID muidLast = MIID_LAST;
hScriptsLangpack = GetPluginLangId(muidLast, 0);
- console = new CMLuaConsole(L);
-
CLuaModuleLoader::Load(L);
CLuaScriptLoader::Load(L);
}
void CMLua::Unload()
{
- delete console;
if (L)
lua_close(L);
KillModuleMenus(hScriptsLangpack);
|