[Libreoffice-commits] core.git: Branch 'feature/chart-3d-chart2' - vcl/source
Stephan Bergmann
sbergman at redhat.com
Sat May 24 03:53:50 PDT 2014
vcl/source/opengl/OpenGLContext.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 4871c68a108f2d28419a4e59384bf3644f80383b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue May 20 09:41:59 2014 +0200
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
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 7221101..d111b3e 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -397,7 +397,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);
@@ -697,7 +697,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;
More information about the Libreoffice-commits
mailing list