Skip to content

Commit efecdbe

Browse files
committed
Fix crash UpdateHUDAddonsVisibility
1 parent ea6d6b3 commit efecdbe

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/xrGame/Weapon.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2543,7 +2543,14 @@ static const char* wpn_grenade_launcher = "wpn_launcher";
25432543
void CWeapon::UpdateHUDAddonsVisibility()
25442544
{
25452545
if (!GetHUDmode())
2546+
{
25462547
return;
2548+
}
2549+
2550+
if (HudItemData() == nullptr)
2551+
{
2552+
return;
2553+
}
25472554

25482555
bool test = !!(get_ScopeStatus() == 2 && IsScopeAttached() || get_ScopeStatus() == 1);
25492556

0 commit comments

Comments
 (0)