Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 6, 2005, 2:10:38 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/updater: TrackManager: now deletes without segfault :) . . . | silly, that i did not think of Joins, and that they delete all preceding stuff, even if it was already deleted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/parenting/src/track_manager.cc

    r3355 r3356  
    3333  this->isFork = false;
    3434  this->isJoined = false;
     35  this->mainJoin = false;
    3536  this->cond; //!< todo think!!
    3637  this->ID = -1;
     
    5758  if (this->curve)
    5859    delete this->curve;
    59   if (this->childCount > 0)
     60  if ((!this->isJoined &&this->childCount > 0) || (this->isJoined && this->mainJoin))
    6061    {
    6162      for (int i=0; i < this->childCount; i++)
    6263        delete this->children[i];
    63     }
    64   if (children)
    65     delete children;
     64      delete this->children;
     65    }
    6666}
    6767
     
    384384  Vector tmpTangentPoint = firstJoint->curve->getNode(firstJoint->curve->getNodeCount()-1);
    385385  firstJoint->isJoined = true;
     386  firstJoint->mainJoin = true;
    386387  if(!firstJoint->isHotPoint)
    387388    this->setSavePoint();
Note: See TracChangeset for help on using the changeset viewer.