diff --git a/src/osg/Drawable.cpp b/src/osg/Drawable.cpp index 5c2b5551b..604cfca0d 100644 --- a/src/osg/Drawable.cpp +++ b/src/osg/Drawable.cpp @@ -256,6 +256,7 @@ Drawable::Drawable(const Drawable& drawable,const CopyOp& copyop): Drawable::~Drawable() { + _stateset = 0; Drawable::releaseGLObjects(); } diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index 4c58ea069..69fb840cf 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -82,6 +82,7 @@ Geometry::Geometry(const Geometry& geometry,const CopyOp& copyop): Geometry::~Geometry() { + _stateset = 0; Geometry::releaseGLObjects(); }