summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-21 10:14:27 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-21 10:14:27 +0200
commit87b60df05852af13980e0bfcd6639d4b734c6708 (patch)
tree1ad09554de6acd60f4df36e4f8625062f65c648a /source
parentMy OCD has alpha-sorted some stuff :) (diff)
downloadcuberite-87b60df05852af13980e0bfcd6639d4b734c6708.tar
cuberite-87b60df05852af13980e0bfcd6639d4b734c6708.tar.gz
cuberite-87b60df05852af13980e0bfcd6639d4b734c6708.tar.bz2
cuberite-87b60df05852af13980e0bfcd6639d4b734c6708.tar.lz
cuberite-87b60df05852af13980e0bfcd6639d4b734c6708.tar.xz
cuberite-87b60df05852af13980e0bfcd6639d4b734c6708.tar.zst
cuberite-87b60df05852af13980e0bfcd6639d4b734c6708.zip
Diffstat (limited to 'source')
-rw-r--r--source/ManualBindings.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/ManualBindings.cpp b/source/ManualBindings.cpp
index 39677b7a8..46ebfd4ae 100644
--- a/source/ManualBindings.cpp
+++ b/source/ManualBindings.cpp
@@ -392,6 +392,11 @@ static int FNNAME(lua_State * tolua_S) \
} \
\
CONTAINER * self = (CONTAINER *) tolua_tousertype(tolua_S, 1, 0); \
+ if (self == NULL) \
+ { \
+ LOGWARN("Error in function call '" #FOREACH "': Not called on an object instance"); \
+ return 0; \
+ } \
\
if (!lua_isfunction( tolua_S, 2)) \
{ \