summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-05-20 10:57:44 +0300
committerTor Lillqvist <tml@collabora.com>2014-05-20 11:07:10 +0300
commitc3ed5f6d3348fa2b6551d0d942632d951555a01d (patch)
treee4119d61ff7ce98e8a12d7ccf5e48a343e1e75f8 /vcl
parentfe39041f98b1abb3a23b43f399963487fe5b66b9 (diff)
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
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 20d9acddfed2..0ce85cb7f4cd 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,