From Laurens Voerman, "like the "Bug in ProxyNode serializer" Farshid Lashkari found (svn submit 13754) the PagedLOD serializer attempts to read begin and and brackets.
Fix is identical (don't read brackets when num_chidren is zero) and applies both to trunk and 3.2 branch."
This commit is contained in:
@@ -96,13 +96,17 @@ static bool checkChildren( const osg::PagedLOD& node )
|
||||
|
||||
static bool readChildren( osgDB::InputStream& is, osg::PagedLOD& node )
|
||||
{
|
||||
unsigned int size = 0; is >> size >> is.BEGIN_BRACKET;
|
||||
for ( unsigned int i=0; i<size; ++i )
|
||||
unsigned int size = 0; is >> size;
|
||||
if (size > 0)
|
||||
{
|
||||
osg::Node* child = dynamic_cast<osg::Node*>( is.readObject() );
|
||||
if ( child ) node.addChild( child );
|
||||
is >> is.BEGIN_BRACKET;
|
||||
for ( unsigned int i=0; i<size; ++i )
|
||||
{
|
||||
osg::Node* child = dynamic_cast<osg::Node*>( is.readObject() );
|
||||
if ( child ) node.addChild( child );
|
||||
}
|
||||
is >> is.END_BRACKET;
|
||||
}
|
||||
is >> is.END_BRACKET;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user