From bcba3928e6be5d284b1611a0472fe5e24d184f67 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 3 Sep 2018 09:37:36 +0100 Subject: [PATCH] Added reset of _stateset to prevent the releaseGLObjects calling release on th StateSet from the destructor --- src/osg/Drawable.cpp | 1 + src/osg/Geometry.cpp | 1 + 2 files changed, 2 insertions(+) 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(); }