From 1591c15b8b11dfe343d48841375d4de825927f5a Mon Sep 17 00:00:00 2001 From: rathnor Date: Sat, 19 Jul 2003 14:07:28 +0000 Subject: make sure we pass null (rather than blank) to XOpenDisplay --- src/FbTk/App.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/FbTk/App.cc b/src/FbTk/App.cc index 3daf61a..18c6e56 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); } -- cgit v0.11.2