DEADSOFTWARE

Player: Add sanity check for network client peer
authorStas'M <x86corez@gmail.com>
Mon, 7 Mar 2022 20:52:10 +0000 (23:52 +0300)
committerStas'M <x86corez@gmail.com>
Mon, 7 Mar 2022 20:52:10 +0000 (23:52 +0300)
src/game/g_player.pas

index 759450b25be60295da39a099a2a12d68e6ac2bdf..89e3deee913bc70cc431c07d9a8c6bdb777b5b16 100644 (file)
@@ -4927,7 +4927,7 @@ begin
       DoLerp(4);
 
   if NetServer then
-    if FClientID >= 0 then
+    if (FClientID >= 0) and (NetClients[FClientID].Peer <> nil) then
     begin
       FPing := NetClients[FClientID].Peer^.lastRoundTripTime;
       if NetClients[FClientID].Peer^.packetsSent > 0 then