Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8302 for code/trunk/src


Ignore:
Timestamp:
Apr 22, 2011, 7:53:36 PM (14 years ago)
Author:
dafrick
Message:

Fixing memory leak in PickupCarrier.

File:
1 edited

Legend:

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

    r8300 r8302  
    126126            return this;
    127127
     128        PickupCarrier* target = NULL;
    128129        // Go recursively through all children to check whether they are the target.
    129130        std::vector<PickupCarrier*>* children = this->getCarrierChildren();
     
    131132        {
    132133            if(pickup->isTarget(*it))
    133                 return *it;
     134            {
     135                target = *it;
     136                break;
     137            }
    134138        }
    135139
     
    137141        delete children;
    138142
    139         return NULL;
     143        return target;
    140144    }
    141145
Note: See TracChangeset for help on using the changeset viewer.