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-c427514a06d6master
parent
9f60f83ea7
commit
87b60df058
|
@ -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)) \
|
||||
{ \
|
||||
|
|
Loading…
Reference in New Issue