1
0

Fixed manual bindings' ForEachXXX mapping not checking the object instance for validity.

( http://forum.mc-server.org/showthread.php?tid=591&pid=5007#pid5007 )

git-svn-id: http://mc-server.googlecode.com/svn/trunk@996 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-10-21 08:14:27 +00:00
parent 9f60f83ea7
commit 87b60df058

View File

@ -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)) \
{ \