summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-05-12 17:49:00 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-05-12 15:54:24 +0000
commit3ddae832bbb71306a574c4e1087de0a0da318966 (patch)
tree12b85bae691b4835c456e6637eee728b27159c60
parentfdo#78608 SwTxtFrm::Paint: fix missing repaint problem on the left edge (diff)
downloadcore-3ddae832bbb71306a574c4e1087de0a0da318966.tar.gz
core-3ddae832bbb71306a574c4e1087de0a0da318966.zip
fix crash when glDebugMessageCallback is 0 despite feature being there
Change-Id: I1e6986e1e56f78f10f4677f471d2bdea2231f787 Reviewed-on: https://gerrit.libreoffice.org/9331 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 58202fb170a2..1700488a6c64 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -525,7 +525,9 @@ bool OpenGLContext::ImplInit()
#ifdef DBG_UTIL
// only enable debug output in dbgutil build
- if( GLEW_ARB_debug_output )
+ // somehow there are implementations where the feature is present and the function
+ // pointer is still NULL
+ if( GLEW_ARB_debug_output && glDebugMessageCallback )
{
glEnable(GL_DEBUG_OUTPUT);
glDebugMessageCallback(&debug_callback, NULL);