Skip to content

Commit 61a0e19

Browse files
authored
Addenum to #4093 (#4095)
1 parent 69ceac7 commit 61a0e19

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Client/game_sa/CBuildingsPoolSA.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ void CBuildingsPoolSA::RemovePedsContactEnityLinks()
374374
ped->pLastContactedEntity[3] = nullptr;
375375
ped->m_ucCollisionState = 0;
376376

377-
reinterpret_cast<CPlayerPedSA*>(pedLinks->pEntity)->SetTargetedEntity(nullptr);
377+
if (auto* playerPed = dynamic_cast<CPlayerPedSA*>(pedLinks->pEntity))
378+
playerPed->SetTargetedEntity(nullptr);
378379
}
379380
}
380381
}

0 commit comments

Comments
 (0)