vcl/source/opengl/OpenGLContext.cxx | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)
New commits: commit 2fd94938a9e45ef143aac51a589654387796e388 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 (cherry picked from commit c94d60d6c164e4552b491d348ab0f5c198b6e856) Signed-off-by: Michael Stahl <mst...@redhat.com> diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index db39c73..5ca7704 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -465,18 +465,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