From 2dcf31b6c7b76a1fa2b8966d5be673ccddbaeecc Mon Sep 17 00:00:00 2001 From: Jack Powell Date: Tue, 18 Aug 2020 15:57:40 +0100 Subject: [PATCH] Call CWorld::Remove before the delete, the original game does this and its safer. --- src/peds/Population.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp index 0756df38..a1bde005 100644 --- a/src/peds/Population.cpp +++ b/src/peds/Population.cpp @@ -117,8 +117,7 @@ CPopulation::Initialise() void CPopulation::RemovePed(CPed *ent) { - // CPed dtor already does that - // CWorld::Remove((CEntity*)ent); + CWorld::Remove((CEntity*)ent); delete ent; }