Krolyxon
Commit 5cab2fb

Branches

Refs →

nsxiv5cab2fb

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
Author
NRK
Date
2022-07-05 11:24 +0200
Committer
Berke Kocaoğlu · 2022-07-05 11:24 +0200
Parent
51d4c8d
Commit
5cab2fb52520e6a24012351b936ebb9162494666

+1 −1

1 file changed

  1. M window.c +1 −1
M window.c View
@@ -95,7 +95,7 @@ static const char* win_res(XrmDatabase db, const char *name, const char *def)
9595
9696 if (db != NULL &&
9797 XrmGetResource(db, name, name, &type, &ret) &&
98− STREQ(type, "String"))
98+ STREQ(type, "String") && *ret.addr != '\0')
9999 {
100100 return ret.addr;
101101 } else {