main.cc: Check getenv output better.
Windows returns pointers to empty strings for non-existent env vars.
This commit is contained in:
parent
9a2c6f94b8
commit
fa63fcdc66
1 changed files with 2 additions and 2 deletions
|
@ -220,12 +220,12 @@ struct Options {
|
|||
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";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue