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:
parent
19f84b52e7
commit
94735a8364
@ -96,13 +96,17 @@ static bool checkChildren( const osg::PagedLOD& node )
|
|||||||
|
|
||||||
static bool readChildren( osgDB::InputStream& is, osg::PagedLOD& node )
|
static bool readChildren( osgDB::InputStream& is, osg::PagedLOD& node )
|
||||||
{
|
{
|
||||||
unsigned int size = 0; is >> size >> is.BEGIN_BRACKET;
|
unsigned int size = 0; is >> size;
|
||||||
for ( unsigned int i=0; i<size; ++i )
|
if (size > 0)
|
||||||
{
|
{
|
||||||
osg::Node* child = dynamic_cast<osg::Node*>( is.readObject() );
|
is >> is.BEGIN_BRACKET;
|
||||||
if ( child ) node.addChild( child );
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user