vcl/source/opengl/OpenGLContext.cxx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)
New commits: commit c94d60d6c164e4552b491d348ab0f5c198b6e856 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Mon Sep 7 22:33:22 2015 +0200 don't use a null display Change-Id: Iab0a53abd723f0309f40742636315079a4b2c532 diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index a80d24b..df8c6a6 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -492,18 +492,24 @@ public: TempErrorHandler(Display* dpy, errorHandler newErrorHandler): mdpy(dpy) { - XLockDisplay(dpy); - XSync(dpy, false); - oldErrorHandler = XSetErrorHandler(newErrorHandler); + if (mdpy) + { + XLockDisplay(dpy); + XSync(dpy, false); + oldErrorHandler = XSetErrorHandler(newErrorHandler); + } } ~TempErrorHandler() { - // sync so that we possibly get an XError - glXWaitGL(); - XSync(mdpy, false); - XSetErrorHandler(oldErrorHandler); - XUnlockDisplay(mdpy); + if (mdpy) + { + // sync so that we possibly get an XError + glXWaitGL(); + XSync(mdpy, false); + XSetErrorHandler(oldErrorHandler); + XUnlockDisplay(mdpy); + } } }; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits