diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-21 10:14:27 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-10-21 10:14:27 +0200 |
commit | 87b60df05852af13980e0bfcd6639d4b734c6708 (patch) | |
tree | 1ad09554de6acd60f4df36e4f8625062f65c648a /source/ManualBindings.cpp | |
parent | My OCD has alpha-sorted some stuff :) (diff) | |
download | cuberite-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/ManualBindings.cpp')
-rw-r--r-- | source/ManualBindings.cpp | 5 |
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)) \ { \ |