From c35159fdde9e80074af248a7cafb0f6320612c4c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 20 Sep 2008 10:34:47 +0000 Subject: [PATCH] From Chris Denham, changed gluGetErrorString to using osg::State::checkGLErrors() to avoid null pointer dereference --- src/osgUtil/SceneView.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/osgUtil/SceneView.cpp b/src/osgUtil/SceneView.cpp index a95d7e9df..27f0f856e 100644 --- a/src/osgUtil/SceneView.cpp +++ b/src/osgUtil/SceneView.cpp @@ -1521,11 +1521,8 @@ void SceneView::draw() if (state->getCheckForGLErrors()!=osg::State::NEVER_CHECK_GL_ERRORS) { - GLenum errorNo = glGetError(); - if (errorNo!=GL_NO_ERROR) + if (state->checkGLErrors("end of SceneView::draw()")) { - osg::notify(WARN)<<"Warning: detected OpenGL error '"<setCheckForGLErrors(osg::State::ONCE_PER_ATTRIBUTE);