From 0433d29d11ebe228d5178b9eb8394ad7995e4caa Mon Sep 17 00:00:00 2001 From: Laurens Voerman Date: Tue, 23 Aug 2016 14:35:47 +0200 Subject: [PATCH 1/2] bugfix: osgVolume::ScalarProperty clone crash --- src/osgVolume/Property.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgVolume/Property.cpp b/src/osgVolume/Property.cpp index 33987cc68..01fede11c 100644 --- a/src/osgVolume/Property.cpp +++ b/src/osgVolume/Property.cpp @@ -102,7 +102,7 @@ ScalarProperty::ScalarProperty(const std::string& scalarName, float value) ScalarProperty::ScalarProperty(const ScalarProperty& sp, const osg::CopyOp& copyop): Property(sp,copyop) { - _uniform = new osg::Uniform(sp._uniform->getName().c_str(), getValue()); + _uniform = new osg::Uniform(*sp._uniform.get(), copyop); } From d0020b7dfc3330c5e34085d9f4f5dc0a83a9d699 Mon Sep 17 00:00:00 2001 From: Laurens Voerman Date: Tue, 23 Aug 2016 14:33:24 +0200 Subject: [PATCH 2/2] bugfix: osg::TextureBuffer::clone() crash --- src/osg/TextureBuffer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osg/TextureBuffer.cpp b/src/osg/TextureBuffer.cpp index 91eea6c51..05187932a 100644 --- a/src/osg/TextureBuffer.cpp +++ b/src/osg/TextureBuffer.cpp @@ -35,7 +35,9 @@ TextureBuffer::TextureBuffer(const TextureBuffer& text,const CopyOp& copyop): Texture(text,copyop), _textureWidth(text._textureWidth) { - setBufferData(osg::clone(text._bufferData.get(), copyop)); + if (text._bufferData.valid()) { + setBufferData(osg::clone(text._bufferData.get(), copyop)); + } } TextureBuffer::~TextureBuffer()