[Orxonox-commit 3618] r8303 - code/trunk/src/orxonox/interfaces

dafrick at orxonox.net dafrick at orxonox.net
Fri Apr 22 20:11:11 CEST 2011


Author: dafrick
Date: 2011-04-22 20:11:10 +0200 (Fri, 22 Apr 2011)
New Revision: 8303

Modified:
   code/trunk/src/orxonox/interfaces/PickupCarrier.cc
Log:
Another memory leak.


Modified: code/trunk/src/orxonox/interfaces/PickupCarrier.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/PickupCarrier.cc	2011-04-22 17:53:36 UTC (rev 8302)
+++ code/trunk/src/orxonox/interfaces/PickupCarrier.cc	2011-04-22 18:11:10 UTC (rev 8303)
@@ -95,12 +95,16 @@
         if(pickup->isTarget(this)) // If the PickupCarrier itself is a target.
             return true;
 
+        bool isTarget = false;
         // Go recursively through all children to check whether they are a target.
         std::vector<PickupCarrier*>* children = this->getCarrierChildren();
         for(std::vector<PickupCarrier*>::const_iterator it = children->begin(); it != children->end(); it++)
         {
             if((*it)->isTarget(pickup))
-                return true;
+            {
+                isTarget = true;
+                break;
+            }
         }
 
         children->clear();




More information about the Orxonox-commit mailing list