From abd02161943f43c3b3e3d7ccc05a8ccae6aa1ace Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 11 Aug 2008 18:18:17 +0200 Subject: [PATCH] tag: allow view only if tag has a screen Signed-off-by: Julien Danjou --- tag.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tag.c b/tag.c index 23167eb65..163b7ed8d 100644 --- a/tag.c +++ b/tag.c @@ -480,7 +480,8 @@ luaA_tag_newindex(lua_State *L) luaL_error(L, "unknown layout: %s", buf); break; case A_TK_SELECTED: - tag_view(*tag, luaA_checkboolean(L, 3)); + if((*tag)->screen != SCREEN_UNDEF) + tag_view(*tag, luaA_checkboolean(L, 3)); return 0; case A_TK_MWFACT: d = luaL_checknumber(L, 3);