summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-09-07 16:39:04 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-09-07 16:41:11 +0200
commit7ce77fcfceae8fd15c3f428deb973509da2eb424 (patch)
treebb9e075fe5818a9eb01b98582ff33cc67d88b28c
parent24560df316de86cea93a37edd38e02a2f2d9c0c2 (diff)
prevent crash with non-vcl OpenGL contexts
Change-Id: Ia829b0f723c8ded1237e52d48f034da3c1ac249e
-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 b1212fdfca4a..83a1811519cd 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -1422,7 +1422,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
}