Merge branch 'Return-nil-in-xrdb_get_value' of https://github.com/psychon/awesome

This commit is contained in:
Uli Schlachter 2016-02-29 20:59:21 +01:00
commit a189f2b13f
1 changed files with 2 additions and 2 deletions

4
xrdb.c
View File

@ -65,14 +65,14 @@ int luaA_xrdb_get_value(lua_State *L) {
&resource_type, &resource_value); &resource_type, &resource_value);
if (resource_code && (strcmp(resource_type, "String") == 0)) { if (resource_code && (strcmp(resource_type, "String") == 0)) {
lua_pushstring(L, (char *)resource_value.addr); lua_pushstring(L, (char *)resource_value.addr);
return 1;
} else { } else {
if (strlen(resource_class)) if (strlen(resource_class))
luaA_warn(L, "Failed to get xrdb value '%s' (class '%s').", resource_name, resource_class); luaA_warn(L, "Failed to get xrdb value '%s' (class '%s').", resource_name, resource_class);
else else
luaA_warn(L, "Failed to get xrdb value '%s'.", resource_name); luaA_warn(L, "Failed to get xrdb value '%s'.", resource_name);
return 0; lua_pushnil(L);
} }
return 1;
} }
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80