Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8470


Ignore:
Timestamp:
May 12, 2011, 5:14:49 PM (14 years ago)
Author:
rgrieder
Message:

A classic fix ;)
Orxonox crashed on startup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/worldentities/SpaceBoundaries.cc

    r8461 r8470  
    6161    SpaceBoundaries::~SpaceBoundaries()
    6262    {
    63         delete this->centerRadar_;
    64        
    65         this->pawnsIn_.clear();
    66        
    67         for( std::vector<billboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++)
    68         {
    69             if( current->billy != NULL)
    70             {
    71                 delete current->billy;
    72             }
    73         }
    74         this->billboards_.clear();
     63        if (this->isInitialized())
     64        {
     65            delete this->centerRadar_;
     66       
     67            this->pawnsIn_.clear();
     68       
     69            for( std::vector<billboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++)
     70            {
     71                if( current->billy != NULL)
     72                {
     73                    delete current->billy;
     74                }
     75            }
     76            this->billboards_.clear();
     77        }
    7578    }
    7679   
Note: See TracChangeset for help on using the changeset viewer.