diff --git a/src/FbTk/App.cc b/src/FbTk/App.cc index 3daf61ab..18c6e563 100644 --- a/src/FbTk/App.cc +++ b/src/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); }