We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93f51f7 commit 87644f5Copy full SHA for 87644f5
Client/game_sa/CPedSA.cpp
@@ -464,9 +464,14 @@ void CPedSA::SetCurrentWeaponSlot(eWeaponSlot weaponSlot)
464
eWeaponSlot currentSlot = GetCurrentWeaponSlot();
465
if (weaponSlot != GetCurrentWeaponSlot())
466
{
467
- CWeapon* pWeapon = GetWeapon(currentSlot);
468
- if (pWeapon)
469
- RemoveWeaponModel(pWeapon->GetInfo(WEAPONSKILL_STD)->GetModel());
+ CWeapon* weapon = GetWeapon(currentSlot);
+ if (weapon)
+ {
470
+ CWeaponInfo* weaponInfo = weapon->GetInfo(WEAPONSKILL_STD);
471
+
472
+ if (weaponInfo)
473
+ RemoveWeaponModel(weaponInfo->GetModel());
474
+ }
475
476
CPedSAInterface* thisPed = (CPedSAInterface*)GetInterface();
477
0 commit comments