From a7a8c2d0246032166249ba60d20065f7cb81ad84 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 4 Nov 2008 15:29:43 +0100 Subject: [PATCH] imagebox: fix index return value Signed-off-by: Julien Danjou --- widgets/imagebox.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/widgets/imagebox.c b/widgets/imagebox.c index 4ebe1b09..abf02899 100644 --- a/widgets/imagebox.c +++ b/widgets/imagebox.c @@ -103,13 +103,16 @@ luaA_imagebox_index(lua_State *L, awesome_token_t token) case A_TK_IMAGE: if(d->image) return luaA_image_userdata_new(L, d->image); + else + return 0; case A_TK_BG: luaA_pushcolor(L, &d->bg); break; default: - break; + return 0; } - return 0; + + return 1; } /** The __newindex method for a imagebox object.