summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_icolib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src/m_icolib.cpp')
-rw-r--r--plugins/MirLua/src/m_icolib.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/MirLua/src/m_icolib.cpp b/plugins/MirLua/src/m_icolib.cpp
index de5195341d..019d1ccf25 100644
--- a/plugins/MirLua/src/m_icolib.cpp
+++ b/plugins/MirLua/src/m_icolib.cpp
@@ -21,7 +21,9 @@ static int icolib_AddIcon(lua_State *L)
si.defaultFile.t = filePath;
si.hDefaultIcon = GetIcon(IDI_SCRIPT);
- HANDLE res = IcoLib_AddIcon(&si, g_mLua->GetHLangpack());
+ int hScriptLangpack = CMLuaScript::GetScriptIdFromEnviroment(L);
+
+ HANDLE res = IcoLib_AddIcon(&si, hScriptLangpack);
lua_pushlightuserdata(L, res);
return 1;