From 255a7e9d5429da5db74f22c4808893c8c9bb8cec Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 4 Sep 2009 16:26:12 +0200 Subject: [PATCH] widgets: allow some value to be nil Signed-off-by: Julien Danjou --- widgets/imagebox.c | 2 +- widgets/textbox.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/widgets/imagebox.c b/widgets/imagebox.c index 3664ece1c..f62f53f0d 100644 --- a/widgets/imagebox.c +++ b/widgets/imagebox.c @@ -133,7 +133,7 @@ luaA_imagebox_newindex(lua_State *L, awesome_token_t token) size_t len; case A_TK_IMAGE: - luaA_checkudata(L, -1, &image_class); + luaA_checkudataornil(L, -1, &image_class); luaA_object_unref_item(L, 1, d->image); d->image = luaA_object_ref_item(L, 1, 3); break; diff --git a/widgets/textbox.c b/widgets/textbox.c index cc9d59a66..e5e63735f 100644 --- a/widgets/textbox.c +++ b/widgets/textbox.c @@ -346,7 +346,7 @@ luaA_textbox_newindex(lua_State *L, awesome_token_t token) d->bg_resize = luaA_checkboolean(L, 3); break; 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); d->bg_image = luaA_object_ref_item(L, 1, 3); break;