Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5088 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Aug 21, 2005, 6:25:54 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: initialize and delete toCoord/toDir in PNode and Element2D

Location:
trunk/src/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/coord/p_node.cc

    r5083 r5088  
    9090  if (this->parent)
    9191    this->parent->removeChild(this);
     92
     93  if (this->toCoordinate != NULL)
     94    delete this->toCoordinate;
     95  if (this->toDirection != NULL)
     96    delete this->toDirection;
     97
    9298}
    9399
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r5084 r5088  
    4545  // delete what has to be deleted here
    4646  Render2D::getInstance()->unregisterElement2D(this);
     47
     48  if (this->toCoordinate != NULL)
     49    delete this->toCoordinate;
     50  if (this->toDirection != NULL)
     51    delete this->toDirection;
    4752}
    4853
     
    6570  this->bRelCoorChanged = true;
    6671  this->bRelDirChanged = true;
     72  this->toCoordinate = NULL;
     73  this->toDirection = NULL;
    6774  if (parent == NULL)
    6875    this->parent = NULL;
Note: See TracChangeset for help on using the changeset viewer.