Kaydet (Commit) be7183d5 authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Andras Timar

don't use a null display

Change-Id: Iab0a53abd723f0309f40742636315079a4b2c532
(cherry picked from commit c94d60d6)
Signed-off-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst c47852b6
...@@ -464,13 +464,18 @@ private: ...@@ -464,13 +464,18 @@ private:
public: public:
TempErrorHandler(Display* dpy, errorHandler newErrorHandler): TempErrorHandler(Display* dpy, errorHandler newErrorHandler):
mdpy(dpy) mdpy(dpy)
{
if (mdpy)
{ {
XLockDisplay(dpy); XLockDisplay(dpy);
XSync(dpy, false); XSync(dpy, false);
oldErrorHandler = XSetErrorHandler(newErrorHandler); oldErrorHandler = XSetErrorHandler(newErrorHandler);
} }
}
~TempErrorHandler() ~TempErrorHandler()
{
if (mdpy)
{ {
// sync so that we possibly get an XError // sync so that we possibly get an XError
glXWaitGL(); glXWaitGL();
...@@ -478,6 +483,7 @@ public: ...@@ -478,6 +483,7 @@ public:
XSetErrorHandler(oldErrorHandler); XSetErrorHandler(oldErrorHandler);
XUnlockDisplay(mdpy); XUnlockDisplay(mdpy);
} }
}
}; };
static bool errorTriggered; static bool errorTriggered;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment