Skip to content

Commit

Permalink
Fix UI error when leaving the lobby too quickly (#887)
Browse files Browse the repository at this point in the history
Adds a validity check for UIPlayer identity before fetching persistent spawn loadout index
  • Loading branch information
NachosChipeados authored Nov 18, 2024
1 parent 22a9dc5 commit 316ec34
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,13 @@ void function UpdateCachedLoadouts_Threaded()
// below here is just making all the menu models update properly and such

#if UI
uiGlobal.pilotSpawnLoadoutIndex = GetPersistentSpawnLoadoutIndex( GetUIPlayer(), "pilot" )
uiGlobal.titanSpawnLoadoutIndex = GetPersistentSpawnLoadoutIndex( GetUIPlayer(), "titan" )
entity UIPlayer = GetUIPlayer()

if ( !IsValid( UIPlayer ) )
return

uiGlobal.pilotSpawnLoadoutIndex = GetPersistentSpawnLoadoutIndex( UIPlayer, "pilot" )
uiGlobal.titanSpawnLoadoutIndex = GetPersistentSpawnLoadoutIndex( UIPlayer, "titan" )
#endif

#if CLIENT
Expand Down

0 comments on commit 316ec34

Please sign in to comment.