summaryrefslogtreecommitdiffstats
path: root/src/Bindings/ManualBindings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bindings/ManualBindings.cpp')
-rw-r--r--src/Bindings/ManualBindings.cpp16
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;