imagebox: fix index return value

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-11-04 15:29:43 +01:00
parent e0730d0da8
commit a7a8c2d024
1 changed files with 5 additions and 2 deletions

View File

@ -103,13 +103,16 @@ luaA_imagebox_index(lua_State *L, awesome_token_t token)
case A_TK_IMAGE: case A_TK_IMAGE:
if(d->image) if(d->image)
return luaA_image_userdata_new(L, d->image); return luaA_image_userdata_new(L, d->image);
else
return 0;
case A_TK_BG: case A_TK_BG:
luaA_pushcolor(L, &d->bg); luaA_pushcolor(L, &d->bg);
break; break;
default: default:
break;
}
return 0; return 0;
}
return 1;
} }
/** The __newindex method for a imagebox object. /** The __newindex method for a imagebox object.