diff options
author | Casper Talvio <ctalvio@gmail.com> | 2024-01-02 23:22:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-02 22:22:08 +0100 |
commit | fd02b453d3ada42d4fd1774737fca9559d971956 (patch) | |
tree | abb8ffd2808b00b0cd01a83125b9c9c60d0909e9 | |
parent | 00a4bb6fb5e107788ea77cad51c8c8004a9537f1 (diff) | |
download | NorthstarMods-fd02b453d3ada42d4fd1774737fca9559d971956.tar.gz NorthstarMods-fd02b453d3ada42d4fd1774737fca9559d971956.zip |
Add validity check to `SaveStatsPeriodically_Threaded` (#769)
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/mp/_stats.nut | 5 |
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 } } |