vcl/source/opengl/OpenGLContext.cxx | 9 +++++++++ 1 file changed, 9 insertions(+)
New commits: commit c3ed5f6d3348fa2b6551d0d942632d951555a01d Author: Tor Lillqvist <t...@collabora.com> Date: Tue May 20 10:57:44 2014 +0300 Fail early in OpenGLContext::ImplInit() on platforms where not yet implemented So far this code apparently has not been invoked except in the very special use cases for which it has been developed, and which presumably aren't such that one would come across in "normal" LibreOffice use. But now it gets invoked unconditionally, in some unit tests even, and letting it call glewInit(), which calls glGetString(), without any OpenGL context, leads to a crash. So instead, explicitly fail early on OS X (and iOS and Android). Change-Id: Ia4547cc1ddff1aaa0190fcdb69506ad444214b7a diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 20d9acd..0ce85cb 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -385,10 +385,19 @@ bool OpenGLContext::ImplInit() m_aGLWin.hDC = GetDC(m_aGLWin.hWnd); #elif defined( MACOSX ) + SAL_INFO("vcl.opengl", "OpenGLContext not implemented yet for OS X"); + return false; + #elif defined( IOS ) + SAL_INFO("vcl.opengl", "OpenGLContext not implemented yet for iOS"); + return false; + #elif defined( ANDROID ) + SAL_INFO("vcl.opengl", "OpenGLContext not implemented yet for Android"); + return false; + #elif defined( UNX ) m_aGLWin.ctx = m_aGLWin.dpy == 0 ? 0 : glXCreateContext(m_aGLWin.dpy, m_aGLWin.vi, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits