Add validity check to `HandleDistanceAndTimeStats_Threaded` to prevent crash (#767)
This commit is contained in:
parent
fd02b453d3
commit
af84c42f71
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue