luaobject: check that object is userdata
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
901029ce97
commit
8da6a20f27
|
@ -224,6 +224,8 @@ luaA_object_emit_signal(lua_State *L, int oud,
|
||||||
{
|
{
|
||||||
int oud_abs = luaA_absindex(L, oud);
|
int oud_abs = luaA_absindex(L, oud);
|
||||||
lua_object_t *obj = lua_touserdata(L, oud);
|
lua_object_t *obj = lua_touserdata(L, oud);
|
||||||
|
if(!obj)
|
||||||
|
luaL_error(L, "trying to emit signal on non-object");
|
||||||
signal_t *sigfound = signal_array_getbyid(&obj->signals,
|
signal_t *sigfound = signal_array_getbyid(&obj->signals,
|
||||||
a_strhash((const unsigned char *) name));
|
a_strhash((const unsigned char *) name));
|
||||||
if(sigfound)
|
if(sigfound)
|
||||||
|
|
Loading…
Reference in New Issue