~ubuntu-branches/debian/experimental/openscenegraph/experimental

« back to all changes in this revision

Viewing changes to OpenSceneGraph/src/osgWrappers/serializers/osg/ProxyNode.cpp

  • Committer: Package Import Robot
  • Author(s): Alberto Luaces Fernández
  • Date: 2014-08-01 20:41:55 UTC
  • mfrom: (1.4.4) (24.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20140801204155-ykq00e43h6eg0ms3
Tags: 3.2.1-1
* Acknowledge NMU.
* New upstream version.
* Removal of old patches.
* Confirmation that (LP: #1339264) is already closed.
* Removed obsolete conflict rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
static bool readChildren( osgDB::InputStream& is, osg::ProxyNode& node )
46
46
{
47
 
    unsigned int size = 0; is >> size >> is.BEGIN_BRACKET;
48
 
    for ( unsigned int i=0; i<size; ++i )
 
47
    unsigned int size = 0; is >> size;
 
48
    if (size > 0)
49
49
    {
50
 
        osg::Node* child = dynamic_cast<osg::Node*>( is.readObject() );
51
 
        if ( child ) node.addChild( child );
 
50
        is >> is.BEGIN_BRACKET;
 
51
        for ( unsigned int i=0; i<size; ++i )
 
52
        {
 
53
            osg::Node* child = dynamic_cast<osg::Node*>( is.readObject() );
 
54
            if ( child ) node.addChild( child );
 
55
        }
 
56
        is >> is.END_BRACKET;
52
57
    }
53
 
    is >> is.END_BRACKET;
54
58
    return true;
55
59
}
56
60