~holger-seelig/titania/0.7.5

« back to all changes in this revision

Viewing changes to libtitania-x3d/Titania/X3D/Execution/X3DExecutionContext.cpp

  • Committer: Holger Seelig
  • Date: 2014-10-24 07:22:24 UTC
  • Revision ID: holger.seelig@yahoo.de-20141024072224-lur2kz2f6tm7li2u
Fixed fatal crash when importing nodes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
{
125
125
        X3DBaseNode::setExecutionContext (value);
126
126
 
127
 
        for (auto & parent : ChildObjectSet (getParents ()))
 
127
        const MFNode nodes (getParents () .begin (), getParents () .end ());
 
128
 
 
129
        for (const auto & node : nodes)
128
130
        {
129
 
                const auto node = dynamic_cast <X3DBaseNode*> (parent);
130
 
 
131
131
                if (not node)
132
132
                        continue;
133
133
 
1228
1228
throw (Error <INVALID_OPERATION_TIMING>,
1229
1229
       Error <DISPOSED>)
1230
1230
{
1231
 
        for (auto & parent : ChildObjectSet (executionContext -> getParents ()))
 
1231
        const MFNode nodes (executionContext -> getParents () .begin (), executionContext -> getParents () .end ());
 
1232
 
 
1233
        for (const auto & node : nodes)
1232
1234
        {
1233
 
                const auto node = dynamic_cast <X3DBaseNode*> (parent);
1234
 
 
1235
1235
                if (not node)
1236
1236
                        continue;
1237
1237