From db10f783a68bccf1f94207376d2c421eb9f4906e Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 27 Aug 2009 10:56:56 +0200 Subject: [PATCH] client: return nil if client is not attached to a screen yet Can happen with the "new" class signal. Signed-off-by: Julien Danjou --- client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client.c b/client.c index 46e6a8cf..55656321 100644 --- a/client.c +++ b/client.c @@ -1922,6 +1922,8 @@ luaA_client_get_type(lua_State *L, client_t *c) static int luaA_client_get_screen(lua_State *L, client_t *c) { + if(!c->screen) + return 0; lua_pushnumber(L, 1 + screen_array_indexof(&globalconf.screens, c->screen)); return 1; }