[Orxonox-commit 3615] r8300 - code/trunk/src/orxonox/interfaces

dafrick at orxonox.net dafrick at orxonox.net
Fri Apr 22 18:32:29 CEST 2011


Author: dafrick
Date: 2011-04-22 18:32:29 +0200 (Fri, 22 Apr 2011)
New Revision: 8300

Modified:
   code/trunk/src/orxonox/interfaces/PickupCarrier.cc
Log:
Apparently bug needs some more fixing.


Modified: code/trunk/src/orxonox/interfaces/PickupCarrier.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/PickupCarrier.cc	2011-04-22 16:26:47 UTC (rev 8299)
+++ code/trunk/src/orxonox/interfaces/PickupCarrier.cc	2011-04-22 16:32:29 UTC (rev 8300)
@@ -72,7 +72,7 @@
             temp = *it;
             (*it)->carrierDestroyed();
             it = this->pickups_.begin();
-            if(temp == *it) // Infinite loop avoidance, in case the pickup wasn't removed from the carrier somewhere in the carrierDestroy() procedure.
+            if(it != this->pickups_.end() && temp == *it) // Infinite loop avoidance, in case the pickup wasn't removed from the carrier somewhere in the carrierDestroy() procedure.
             {
                 COUT(2) << "Oops. In a PickupCarrier, while cleaning up, a Pickupable (&" << temp << ") didn't unregister itself as it should have." << std::endl;;
                 it++;




More information about the Orxonox-commit mailing list