From ccf3bef719e71ccafe3a0bd154d0e85d7184a15b Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Fri, 4 Mar 2016 17:25:58 +0000 Subject: MirLua: fixed crash on script reloading git-svn-id: http://svn.miranda-ng.org/main/trunk@16424 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/mlua.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'plugins/MirLua/src/mlua.cpp') diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp index da56eeb902..9aab05a3a6 100644 --- a/plugins/MirLua/src/mlua.cpp +++ b/plugins/MirLua/src/mlua.cpp @@ -1,5 +1,7 @@ #include "stdafx.h" +int hMLuaLangpack; + LIST CMLua::HookRefs(1, HandleKeySortT); LIST CMLua::ServiceRefs(1, HandleKeySortT); @@ -10,6 +12,8 @@ static int CompareScripts(const CMLuaScript* p1, const CMLuaScript* p2) CMLua::CMLua() : L(NULL), Scripts(10, CompareScripts) { + MUUID muidLast = MIID_LAST; + hMLuaLangpack = GetPluginLangId(muidLast, 0); } CMLua::~CMLua() @@ -70,10 +74,10 @@ void CMLua::Unload() KillModuleScheduleTasks(); KillModuleTTBButton(); - KillModuleIcons(hLangpack); - KillModuleSounds(hLangpack); - KillModuleMenus(hLangpack); - KillModuleHotkeys(hLangpack); + KillModuleIcons(hMLuaLangpack); + KillModuleSounds(hMLuaLangpack); + KillModuleMenus(hMLuaLangpack); + KillModuleHotkeys(hMLuaLangpack); KillObjectEventHooks(L); KillObjectServices(L); -- cgit v1.2.3