summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-09-07 16:39:04 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-09-07 16:02:43 +0100
commit42674aaed9b3f88fa95eb73a3cd88d4fb56264e1 (patch)
tree7bcb663d27a57ec6425bdfb0cf03ad12a38920ca
parentf14659933b6ddb76c55a523badf50e61f8015ec7 (diff)
tdf#93989 - prevent crash with non-vcl OpenGL contexts
Change-Id: Ia829b0f723c8ded1237e52d48f034da3c1ac249e Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index e2176905f46a..978fdd7f28c1 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -1505,7 +1505,8 @@ void OpenGLContext::resetCurrent()
#elif defined( IOS ) || defined( ANDROID ) || defined(LIBO_HEADLESS)
// nothing
#elif defined( UNX )
- glXMakeCurrent(m_aGLWin.dpy, None, NULL);
+ if (m_aGLWin.dpy)
+ glXMakeCurrent(m_aGLWin.dpy, None, NULL);
#endif
}