diff options
author | Mattes D <github@xoft.cz> | 2014-10-31 19:27:35 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-10-31 19:27:35 +0100 |
commit | 0dd804a59120ce495224f98a0acabc69c6924b08 (patch) | |
tree | 9669c462a28a40229b6b2690d7e1613dfe7392c7 /src/Bindings | |
parent | GrownProt biomes: added alterations. (diff) | |
parent | cLuaState: Fixed errors on non-existent callbacks. (diff) | |
download | cuberite-0dd804a59120ce495224f98a0acabc69c6924b08.tar cuberite-0dd804a59120ce495224f98a0acabc69c6924b08.tar.gz cuberite-0dd804a59120ce495224f98a0acabc69c6924b08.tar.bz2 cuberite-0dd804a59120ce495224f98a0acabc69c6924b08.tar.lz cuberite-0dd804a59120ce495224f98a0acabc69c6924b08.tar.xz cuberite-0dd804a59120ce495224f98a0acabc69c6924b08.tar.zst cuberite-0dd804a59120ce495224f98a0acabc69c6924b08.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/LuaState.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h index d1e9923b4..c13e36188 100644 --- a/src/Bindings/LuaState.h +++ b/src/Bindings/LuaState.h @@ -247,7 +247,11 @@ public: template <typename FnT, typename... Args> bool Call(const FnT & a_Function, Args &&... args) { - PushFunction(a_Function); + if (!PushFunction(a_Function)) + { + // Pushing the function failed + return false; + } return PushCallPop(args...); } |