summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/peds/PedAttractor.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/peds/PedAttractor.cpp b/src/peds/PedAttractor.cpp
index 9f77f2a4..cebe31b0 100644
--- a/src/peds/PedAttractor.cpp
+++ b/src/peds/PedAttractor.cpp
@@ -135,8 +135,10 @@ void CPedAttractorManager::RemoveIceCreamVanEffects(C2dEffect* pEffect)
if (vVehicleToEffect.empty())
return;
for (std::vector<CVehicleToEffect>::const_iterator assoc = vVehicleToEffect.cbegin(); assoc != vVehicleToEffect.cend();) {
- if (assoc->GetVehicle() != pVehicle)
- return;
+ if (assoc->GetVehicle() != pVehicle) {
+ assoc++;
+ continue;
+ }
uint32 total = 0;
for (uint32 j = 0; j < NUM_ATTRACTORS_FOR_ICECREAM_VAN; j++) {
if (FindAssociatedAttractor(assoc->GetEffect(j), vIceCreamAttractors))