all repos — fluxbox @ 1591c15b8b11dfe343d48841375d4de825927f5a

custom fork of the fluxbox windowmanager

make sure we pass null (rather than blank) to XOpenDisplay
rathnor rathnor
commit

1591c15b8b11dfe343d48841375d4de825927f5a

parent

9c3b06945a4079f1cbd83441a0a68fc6694b6be5

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/FbTk/App.ccsrc/FbTk/App.cc

@@ -40,6 +40,10 @@ App::App(const char *displayname):m_done(false) {

if (s_app != 0) throw std::string("Can't create more than one instance of FbTk::App"); s_app = this; + // this allows the use of std::string.c_str(), which returns + // a blank string, rather than a null string, so we make them equivalent + if (displayname != 0 && displayname[0] == '\0') + displayname = 0; m_display = XOpenDisplay(displayname); }