diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-05-20 09:41:59 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-05-20 09:41:59 +0200 |
commit | 498c314861f0913a5b31ee29efc38aad12c3a781 (patch) | |
tree | 86a74c44f9b765846c079667ff57e1419f43c024 /vcl | |
parent | f3a46244a07b76d633ccc7f83da3fa502612e978 (diff) |
Hack to for now work around dpy == null crashing CppunitTest_chart2_*
...since 2fc4f5cd750cc3899ffc6b2f831edcb01e7773b4 "Register OpenGL windows to
ScGridWindow upon file load." Should be revisited and fixed properly.
Change-Id: I5a3d08cb750fd9ec7c98d5b85250eaabd1c7a8b2
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 6bb7c1036552..20d9acddfed2 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -390,7 +390,7 @@ bool OpenGLContext::ImplInit() #elif defined( ANDROID ) #elif defined( UNX ) - m_aGLWin.ctx = glXCreateContext(m_aGLWin.dpy, + m_aGLWin.ctx = m_aGLWin.dpy == 0 ? 0 : glXCreateContext(m_aGLWin.dpy, m_aGLWin.vi, 0, GL_TRUE); @@ -690,7 +690,7 @@ SystemWindowData OpenGLContext::generateWinData(Window* pParent) Display *dpy = reinterpret_cast<Display*>(sysData->pDisplay); - if( !glXQueryExtension( dpy, NULL, NULL ) ) + if( dpy == 0 || !glXQueryExtension( dpy, NULL, NULL ) ) return aWinData; XLIB_Window win = sysData->aWindow; |