From 0a4efa35c38649eeb7c3a0bcfc742a09068774f6 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 20 Jan 2015 11:24:31 +0000 Subject: [PATCH] Changed the reset of the GLExtensions::Set() in the State destructor so that it checks to see if the local _glExtensions pointer has been set up and taken ownership of the GLExtensions::Set() value git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14661 16af8721-9629-0410-8352-f15c8da7e697 --- src/osg/State.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/osg/State.cpp b/src/osg/State.cpp index 3650d8f2a..b318f20f4 100644 --- a/src/osg/State.cpp +++ b/src/osg/State.cpp @@ -132,8 +132,11 @@ State::State(): State::~State() { // delete the GLExtensions object associated with this osg::State. - GLExtensions::Set(_contextID, 0); - _glExtensions = 0; + if (_glExtensions) + { + GLExtensions::Set(_contextID, 0); + _glExtensions = 0; + } //_texCoordArrayList.clear();