summaryrefslogtreecommitdiffstats
path: root/src/control/SetPieces.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/control/SetPieces.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/control/SetPieces.cpp b/src/control/SetPieces.cpp
index 143115b8..0409a8bf 100644
--- a/src/control/SetPieces.cpp
+++ b/src/control/SetPieces.cpp
@@ -260,8 +260,8 @@ void CSetPiece::Update(void)
CCarAI::AddPoliceCarOccupants(pVehicle1);
CVehicle* pVehicle2 = TryToGenerateCopCar(m_vSpawn2, m_vTarget2);
if (!pVehicle2) {
- CWorld::Remove(pVehicle2);
- delete pVehicle2;
+ CWorld::Remove(pVehicle1);
+ delete pVehicle1;
return;
}
pVehicle2->SetStatus(STATUS_PHYSICS);