diff options
author | NRK <nrk@disroot.org> | 2022-07-05 11:24:53 +0200 |
---|---|---|
committer | Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr> | 2022-07-05 11:24:53 +0200 |
commit | 5cab2fb52520e6a24012351b936ebb9162494666 (patch) | |
tree | edd27bce7b97b9b67ca334f0da1de1bb54eb60eb /window.c | |
parent | 51d4c8dd4f793114cbc520f2a8465981bd1d4eaa (diff) |
reject empty xresources (#340)
currently, in case of an empty xresources we would fail to init:
nsxiv: Error allocating color ''
instead, just reject empty value and use the fallback.
Closes: https://codeberg.org/nsxiv/nsxiv/issues/339
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/340
Reviewed-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
Co-authored-by: NRK <nrk@disroot.org>
Co-committed-by: NRK <nrk@disroot.org>
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -95,7 +95,7 @@ static const char* win_res(XrmDatabase db, const char *name, const char *def) if (db != NULL && XrmGetResource(db, name, name, &type, &ret) && - STREQ(type, "String")) + STREQ(type, "String") && *ret.addr != '\0') { return ret.addr; } else { |