summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_sounds.cpp
diff options
context:
space:
mode:
authorKonstantin <apollo2k4@narod.ru>2018-05-20 21:05:22 +0300
committerKonstantin <apollo2k4@narod.ru>2018-05-20 21:05:22 +0300
commit3f90207479ee0a6530631812717801a54093658c (patch)
tree6fd49e050ec5179df59fc5badc18e5668e0d6008 /plugins/MirLua/src/m_sounds.cpp
parent7d6b89fd45814936d0edeff664bf5efb2d19b875 (diff)
parent5de8252e58fbdbebb8914e99a90bec06a0ff039f (diff)
Merge branch 'master' of https://github.com/miranda-ng/miranda-ng
Diffstat (limited to 'plugins/MirLua/src/m_sounds.cpp')
-rw-r--r--plugins/MirLua/src/m_sounds.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/MirLua/src/m_sounds.cpp b/plugins/MirLua/src/m_sounds.cpp
index 177148320a..b50bd0c20f 100644
--- a/plugins/MirLua/src/m_sounds.cpp
+++ b/plugins/MirLua/src/m_sounds.cpp
@@ -7,12 +7,10 @@ static int lua_AddSound(lua_State *L)
ptrW section(mir_utf8decodeW(luaL_optstring(L, 3, MODULENAME)));
ptrW filePath(mir_utf8decodeW(lua_tostring(L, 4)));
- int res;
- CMPluginBase *pPlugin = GetPluginByLangId(CMLuaEnvironment::GetEnvironmentId(L));
+ int res = 1;
+ CMPluginBase *pPlugin = CMLuaEnvironment::GetEnvironment(L);
if (pPlugin != nullptr)
res = pPlugin->addSound(name, section, description, filePath);
- else
- res = 1;
lua_pushboolean(L, res == 0);
return 1;