tag: check for screen number before invalidate

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-08-08 14:34:50 +02:00
parent 9cb22b96eb
commit 4dd5a2b6b0
1 changed files with 1 additions and 1 deletions

2
tag.c
View File

@ -402,10 +402,10 @@ luaA_tag_newindex(lua_State *L)
if(tags->tab[i] != *tag && !a_strcmp(buf, tags->tab[i]->name)) if(tags->tab[i] != *tag && !a_strcmp(buf, tags->tab[i]->name))
luaL_error(L, "a tag with the name `%s' is already on screen %d", luaL_error(L, "a tag with the name `%s' is already on screen %d",
buf, (*tag)->screen); buf, (*tag)->screen);
widget_invalidate_cache((*tag)->screen, WIDGET_CACHE_TAGS);
} }
p_delete(&(*tag)->name); p_delete(&(*tag)->name);
a_iso2utf8(&(*tag)->name, buf, len); a_iso2utf8(&(*tag)->name, buf, len);
widget_invalidate_cache((*tag)->screen, WIDGET_CACHE_TAGS);
break; break;
case A_TK_SCREEN: case A_TK_SCREEN:
if((*tag)->screen == SCREEN_UNDEF) if((*tag)->screen == SCREEN_UNDEF)