From 2200ebfbe1478b62badc0d9515c4f7df6df05a19 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 25 May 2012 16:07:11 +0000 Subject: [PATCH] From Wang Rui, "A very small but maybe fatal problem was found when I saved models with shader and uniforms (with new double types support) to osgb format and tried to read it again. The application will crash here. And the serializer file should be slightly changed to fix it. Please replace the original file in osgWrappers/serializers/osg/Uniform.cpp." --- src/osgWrappers/serializers/osg/Uniform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgWrappers/serializers/osg/Uniform.cpp b/src/osgWrappers/serializers/osg/Uniform.cpp index 3c362a714..2502a79d6 100644 --- a/src/osgWrappers/serializers/osg/Uniform.cpp +++ b/src/osgWrappers/serializers/osg/Uniform.cpp @@ -37,7 +37,7 @@ static bool writeElements( osgDB::OutputStream& os, const osg::Uniform& uniform os << (uniform.getFloatArray()!=NULL); os.writeArray( uniform.getFloatArray() ); } - if ( uniform.getDoubleArray()!=NULL ) + else if ( uniform.getDoubleArray()!=NULL ) { os << (uniform.getDoubleArray()!=NULL); os.writeArray( uniform.getDoubleArray() );