Skip to content

Commit

Permalink
drawin: Use the correct lua_State for the stack index
Browse files Browse the repository at this point in the history
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 <psychon@znc.in>
  • Loading branch information
psychon committed Dec 6, 2014
1 parent f957764 commit 4cfea18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions objects/drawin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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);
Expand Down

0 comments on commit 4cfea18

Please sign in to comment.