diff options
author | Lukas Pioch <lukas@zgow.de> | 2017-04-16 11:41:40 +0200 |
---|---|---|
committer | Lukas Pioch <lukas@zgow.de> | 2017-04-22 09:29:13 +0200 |
commit | 76bf5d770c4a34ca34b14eef15ab76e4215f1521 (patch) | |
tree | d2c3da3a4197398772600b9edf7102f0b9c17ebd /src/Bindings/ManualBindings.cpp | |
parent | APIDoc: Corrected a few links (diff) | |
download | cuberite-callbacks.tar cuberite-callbacks.tar.gz cuberite-callbacks.tar.bz2 cuberite-callbacks.tar.lz cuberite-callbacks.tar.xz cuberite-callbacks.tar.zst cuberite-callbacks.zip |
Diffstat (limited to 'src/Bindings/ManualBindings.cpp')
-rw-r--r-- | src/Bindings/ManualBindings.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp index 34357eb65..dadfdba82 100644 --- a/src/Bindings/ManualBindings.cpp +++ b/src/Bindings/ManualBindings.cpp @@ -1237,8 +1237,12 @@ static int tolua_cPluginManager_ForEachCommand(lua_State * tolua_S) { UNUSED(a_Plugin); bool ret = false; - m_LuaState.Call(m_FnRef, a_Command, a_Permission, a_HelpString, cLuaState::Return, ret); - return ret; + if (m_LuaState.Call(m_FnRef, a_Command, a_Permission, a_HelpString, cLuaState::Return, ret)) + { + return ret; + } + // An error occurred + return true; } cLuaState & m_LuaState; cLuaState::cRef & m_FnRef; @@ -1296,8 +1300,12 @@ static int tolua_cPluginManager_ForEachConsoleCommand(lua_State * tolua_S) UNUSED(a_Plugin); UNUSED(a_Permission); bool ret = false; - m_LuaState.Call(m_FnRef, a_Command, a_HelpString, cLuaState::Return, ret); - return ret; + if (m_LuaState.Call(m_FnRef, a_Command, a_HelpString, cLuaState::Return, ret)) + { + return ret; + } + // An error occurred + return true; } cLuaState & m_LuaState; cLuaState::cRef & m_FnRef; |