Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit e9a265a

Browse files
committed
Added missing safety check
1 parent 72afdff commit e9a265a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Entities/AHuman.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3411,8 +3411,10 @@ void AHuman::Update()
34113411
}
34123412
}
34133413
} else if (m_ArmsState == THROWING_RELEASE && m_ThrowTmr.GetElapsedSimTimeMS() > 100) {
3414-
m_pFGArm->SetHeldDevice(dynamic_cast<HeldDevice *>(SwapNextInventory()));
3415-
m_pFGArm->SetHandPos(m_Pos + RotateOffset(m_HolsterOffset));
3414+
if (m_pFGArm) {
3415+
m_pFGArm->SetHeldDevice(dynamic_cast<HeldDevice *>(SwapNextInventory()));
3416+
m_pFGArm->SetHandPos(m_Pos + RotateOffset(m_HolsterOffset));
3417+
}
34163418
EquipShieldInBGArm();
34173419
m_ArmsState = WEAPON_READY;
34183420
} else if (m_ArmsState == THROWING_RELEASE) {

0 commit comments

Comments
 (0)