aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/mp
diff options
context:
space:
mode:
authorCasper Talvio <ctalvio@gmail.com>2024-01-02 23:22:08 +0200
committerGitHub <noreply@github.com>2024-01-02 22:22:08 +0100
commitfd02b453d3ada42d4fd1774737fca9559d971956 (patch)
treeabb8ffd2808b00b0cd01a83125b9c9c60d0909e9 /Northstar.CustomServers/mod/scripts/vscripts/mp
parent00a4bb6fb5e107788ea77cad51c8c8004a9537f1 (diff)
downloadNorthstarMods-fd02b453d3ada42d4fd1774737fca9559d971956.tar.gz
NorthstarMods-fd02b453d3ada42d4fd1774737fca9559d971956.zip
Add validity check to `SaveStatsPeriodically_Threaded` (#769)
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/mp')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_stats.nut5
1 files changed, 4 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_stats.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_stats.nut
index bd64e4ca..f3180214 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_stats.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_stats.nut
@@ -1035,7 +1035,10 @@ void function SaveStatsPeriodically_Threaded()
while( true )
{
foreach( entity player in GetPlayerArray() )
- Stats_SaveAllStats( player )
+ {
+ if ( IsValid( player ) )
+ Stats_SaveAllStats( player )
+ }
wait 5
}
}