summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-02-14 18:08:55 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2021-02-14 18:08:55 +0100
commit6ba0d2e6bd9b874e156444061621958e4d17e18a (patch)
tree17ba28ce36571321dd7a935cbfdd0b95e805c2ec
parentoptimize performance -> readme to-do (diff)
downloadre3-6ba0d2e6bd9b874e156444061621958e4d17e18a.tar
re3-6ba0d2e6bd9b874e156444061621958e4d17e18a.tar.gz
re3-6ba0d2e6bd9b874e156444061621958e4d17e18a.tar.bz2
re3-6ba0d2e6bd9b874e156444061621958e4d17e18a.tar.lz
re3-6ba0d2e6bd9b874e156444061621958e4d17e18a.tar.xz
re3-6ba0d2e6bd9b874e156444061621958e4d17e18a.tar.zst
re3-6ba0d2e6bd9b874e156444061621958e4d17e18a.zip
-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);