Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 16, 2010, 10:49:35 AM (14 years ago)
Author:
dafrick
Message:

Resolved segmentation fault, when destroying a PickupCompilation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc

    r6524 r6533  
    6464    PickupCarrier::~PickupCarrier()
    6565    {
    66         for(std::set<Pickupable*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++)
     66        while(this->pickups_.size() > 0)
    6767        {
     68            std::set<Pickupable*>::iterator it = this->pickups_.begin();
     69            this->pickups_.erase(it);
    6870            (*it)->destroy();
    6971        }
    70        
     72
    7173        this->pickups_.clear();
    7274    }
Note: See TracChangeset for help on using the changeset viewer.