From 4cfea189f04e3133c87b36ef26229abaa4ab7eb2 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 6 Dec 2014 10:55:21 +0100 Subject: [PATCH] drawin: Use the correct lua_State for the stack index This just pushed the drawin onto the stack L, but then tries to access it via globalconf.L. This just calls for problems... Signed-off-by: Uli Schlachter --- objects/drawin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/objects/drawin.c b/objects/drawin.c index 521b426b..5fc2d037 100644 --- a/objects/drawin.c +++ b/objects/drawin.c @@ -231,7 +231,7 @@ drawin_set_visible(lua_State *L, int udx, bool v) /* duplicate drawin */ lua_pushvalue(L, udx); /* ref it */ - luaA_object_ref_class(globalconf.L, -1, &drawin_class); + luaA_object_ref_class(L, -1, &drawin_class); } else { @@ -242,7 +242,7 @@ drawin_set_visible(lua_State *L, int udx, bool v) /* Active BMA */ client_restore_enterleave_events(); /* unref it */ - luaA_object_unref(globalconf.L, drawin); + luaA_object_unref(L, drawin); } luaA_object_emit_signal(L, udx, "property::visible", 0);