openbsd-ports/x11/fluxbox/patches/patch-src_main_cc

23 lines
687 B
Plaintext

$OpenBSD: patch-src_main_cc,v 1.3 2011/12/29 16:15:53 dcoppa Exp $
Check getenv output better
(upstream git commit fa63fcdc669efb868ca8979374eca26d82708c38)
--- src/main.cc.orig Sat Oct 29 15:46:15 2011
+++ src/main.cc Thu Dec 29 16:41:47 2011
@@ -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";
}