From 3dd9f8d4303c8c1ccf61caeb581daa6122fc6e4e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 19 Nov 2014 11:37:37 +0000 Subject: [PATCH] From Laurens Voerman, "I found a new way to crach the osgviewer: osgviewer "ProxyNode { FileNameList { cow.osgt } num_children 1 }".osgs The proxy node reader wrongly assumes options to be non NULL. fixed in attached zip: src\osgWrappers\deprecated-dotosg\osg\ProxyNode.cpp applies to both the 3.2 branch and svn trunk" git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14484 16af8721-9629-0410-8352-f15c8da7e697 --- src/osgWrappers/deprecated-dotosg/osg/ProxyNode.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osgWrappers/deprecated-dotosg/osg/ProxyNode.cpp b/src/osgWrappers/deprecated-dotosg/osg/ProxyNode.cpp index 024face00..5c3317d72 100644 --- a/src/osgWrappers/deprecated-dotosg/osg/ProxyNode.cpp +++ b/src/osgWrappers/deprecated-dotosg/osg/ProxyNode.cpp @@ -123,6 +123,8 @@ bool ProxyNode_readLocalData(Object& obj, Input& fr) iteratorAdvanced = true; } + bool make_options = (fr.getOptions() == NULL); + if (make_options) fr.setOptions(new osgDB::Options()); //need valid options unsigned int i; for(i=0; i