mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
widgets: allow some value to be nil
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
af44734bd4
commit
255a7e9d54
2 changed files with 2 additions and 2 deletions
|
@ -133,7 +133,7 @@ luaA_imagebox_newindex(lua_State *L, awesome_token_t token)
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
case A_TK_IMAGE:
|
case A_TK_IMAGE:
|
||||||
luaA_checkudata(L, -1, &image_class);
|
luaA_checkudataornil(L, -1, &image_class);
|
||||||
luaA_object_unref_item(L, 1, d->image);
|
luaA_object_unref_item(L, 1, d->image);
|
||||||
d->image = luaA_object_ref_item(L, 1, 3);
|
d->image = luaA_object_ref_item(L, 1, 3);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -346,7 +346,7 @@ luaA_textbox_newindex(lua_State *L, awesome_token_t token)
|
||||||
d->bg_resize = luaA_checkboolean(L, 3);
|
d->bg_resize = luaA_checkboolean(L, 3);
|
||||||
break;
|
break;
|
||||||
case A_TK_BG_IMAGE:
|
case A_TK_BG_IMAGE:
|
||||||
luaA_checkudata(L, -1, &image_class);
|
luaA_checkudataornil(L, -1, &image_class);
|
||||||
luaA_object_unref_item(L, 1, d->bg_image);
|
luaA_object_unref_item(L, 1, d->bg_image);
|
||||||
d->bg_image = luaA_object_ref_item(L, 1, 3);
|
d->bg_image = luaA_object_ref_item(L, 1, 3);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue