X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=glws_glx.cpp;h=64f8ce129a41089a75f702c39b6f0359533171d8;hb=e4397f1fb5fd49d6d3fbefc31aa3f11eb3ae312d;hp=661e77db4ae1b0a874329fd909126baa58433ade;hpb=cefdd197f2f20d8afdbcac6e93680ac9aa8c0351;p=apitrace diff --git a/glws_glx.cpp b/glws_glx.cpp index 661e77d..64f8ce1 100644 --- a/glws_glx.cpp +++ b/glws_glx.cpp @@ -23,6 +23,9 @@ * **************************************************************************/ +#include +#include + #include "glimports.hpp" #include "glws.hpp" @@ -102,6 +105,10 @@ private: public: GlxWindowSystem() { display = XOpenDisplay(NULL); + if (!display) { + std::cerr << "error: unable to open display " << XDisplayName(NULL) << "\n"; + exit(1); + } screen = DefaultScreen(display); }