all repos — fluxbox @ fa63fcdc669efb868ca8979374eca26d82708c38

custom fork of the fluxbox windowmanager

main.cc: Check getenv output better.

Windows returns pointers to empty strings for non-existent env vars.
Ryan Pavlik rpavlik@iastate.edu
commit

fa63fcdc669efb868ca8979374eca26d82708c38

parent

9a2c6f94b8a8c2b078084b552acc58909e831a07

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/main.ccsrc/main.cc

@@ -220,12 +220,12 @@

const char* env; env = getenv("DISPLAY"); - if (env) { + if (env && strlen(env) > 0) { session_display.assign(env); } env = getenv("HOME"); - if (env) { + if (env && strlen(env) > 0) { rc_path.assign(std::string(env) + "/." + realProgramName("fluxbox")); rc_file = rc_path + "/init"; }