Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3356 in orxonox.OLD


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.

Location:
orxonox/branches/parenting/src
Files:
3 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();
  • orxonox/branches/parenting/src/track_manager.h

    r3354 r3356  
    4040  bool isFork;               //!< If the first node is a Fork
    4141  bool isJoined;             //!< If the End of the Curve is joined.
     42  bool mainJoin;             //!< If the End of the Curve is joined, and this is the one Curve the others join to.
    4243  PathCondition cond;        //!< The Split Condition;
    4344  int ID;                    //!< The ID of this TrackElement
  • orxonox/branches/parenting/src/world.cc

    r3355 r3356  
    587587  trackManager->drawGraph(.01);
    588588  trackManager->debug(2);
    589   //  delete trackManager;
     589  delete trackManager;
    590590 
    591591  /*
Note: See TracChangeset for help on using the changeset viewer.