From 94a2101834bf42cd5f4d1465c031d682b83b92d5 Mon Sep 17 00:00:00 2001 From: FileEX Date: Sat, 7 Dec 2024 13:16:51 +0100 Subject: [PATCH] Fix crash --- Client/game_sa/CProjectileInfoSA.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Client/game_sa/CProjectileInfoSA.cpp b/Client/game_sa/CProjectileInfoSA.cpp index 439553941d..5750d61dec 100644 --- a/Client/game_sa/CProjectileInfoSA.cpp +++ b/Client/game_sa/CProjectileInfoSA.cpp @@ -46,6 +46,11 @@ void CProjectileInfoSA::RemoveProjectile(CProjectileInfo* pProjectileInfo, CProj // Has it not already been removed by GTA? if (pProjectileInfo->IsActive()) { + // Fix crash when disconnecting + // GH #3876 + if (!projectileInfoInterface->pEntProjectileOwner || projectileInfoInterface->pEntProjectileOwner->nType == ENTITY_TYPE_NOTHING || projectileInfoInterface->pEntProjectileOwner->pReferences == reinterpret_cast(0x80808080)) + bBlow = false; + if (bBlow) { DWORD dwFunc = FUNC_RemoveProjectile;