Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
FileEX committed Dec 7, 2024
1 parent 63d3ab7 commit 94a2101
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Client/game_sa/CProjectileInfoSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<void*>(0x80808080))
bBlow = false;

if (bBlow)
{
DWORD dwFunc = FUNC_RemoveProjectile;
Expand Down

0 comments on commit 94a2101

Please sign in to comment.