diff --git a/src/osg/GraphicsContext.cpp b/src/osg/GraphicsContext.cpp index b0530b976..3beddee93 100644 --- a/src/osg/GraphicsContext.cpp +++ b/src/osg/GraphicsContext.cpp @@ -767,7 +767,7 @@ void GraphicsContext::removeCamera(osg::Camera* camera) nitr != nodes.end(); ++nitr) { - const_cast(*nitr)->releaseGLObjects(_state.get()); + (*nitr)->releaseGLObjects(_state.get()); } // release the context of the any RenderingCache that the Camera has.