Skip to content

Commit

Permalink
Add validity check to HandleDistanceAndTimeStats_Threaded to preven…
Browse files Browse the repository at this point in the history
…t crash (#767)
  • Loading branch information
CTalvio authored Jan 2, 2024
1 parent fd02b45 commit af84c42
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Northstar.CustomServers/mod/scripts/vscripts/mp/_stats.nut
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,9 @@ void function HandleDistanceAndTimeStats_Threaded()
// track distance stats
foreach ( entity player in GetPlayerArray() )
{
if ( !IsValid( player ) )
continue

if ( player.p.lastPosForDistanceStatValid )
{
// not 100% sure on using Distance2D over Distance tbh
Expand Down

0 comments on commit af84c42

Please sign in to comment.