diff options
author | Konstantin <apollo2k4@narod.ru> | 2018-05-20 21:09:53 +0300 |
---|---|---|
committer | Konstantin <apollo2k4@narod.ru> | 2018-05-20 21:09:53 +0300 |
commit | 46363eef857b69761f1d6d28da5a53a954f76900 (patch) | |
tree | af7282360d4c57aa26c1d9de260505583076c933 /plugins/MirLua/src/m_sounds.cpp | |
parent | 3f90207479ee0a6530631812717801a54093658c (diff) |
Revert "Merge branch 'master' of https://github.com/miranda-ng/miranda-ng"
This reverts commit 3f90207479ee0a6530631812717801a54093658c, reversing
changes made to 7d6b89fd45814936d0edeff664bf5efb2d19b875.
Diffstat (limited to 'plugins/MirLua/src/m_sounds.cpp')
-rw-r--r-- | plugins/MirLua/src/m_sounds.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/MirLua/src/m_sounds.cpp b/plugins/MirLua/src/m_sounds.cpp index b50bd0c20f..177148320a 100644 --- a/plugins/MirLua/src/m_sounds.cpp +++ b/plugins/MirLua/src/m_sounds.cpp @@ -7,10 +7,12 @@ 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 = 1;
- CMPluginBase *pPlugin = CMLuaEnvironment::GetEnvironment(L);
+ int res;
+ CMPluginBase *pPlugin = GetPluginByLangId(CMLuaEnvironment::GetEnvironmentId(L));
if (pPlugin != nullptr)
res = pPlugin->addSound(name, section, description, filePath);
+ else
+ res = 1;
lua_pushboolean(L, res == 0);
return 1;
|