From 1c967e5ce75ad18095cb5655a53457c44eccde5a Mon Sep 17 00:00:00 2001 From: bgkillas Date: Sat, 2 Nov 2024 17:04:33 -0400 Subject: [PATCH] fix spectator helps indexing nil sometimes --- quant.ew/files/system/spectator_helps/spectator_helps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quant.ew/files/system/spectator_helps/spectator_helps.lua b/quant.ew/files/system/spectator_helps/spectator_helps.lua index c7d523f8..cb6ac6a1 100644 --- a/quant.ew/files/system/spectator_helps/spectator_helps.lua +++ b/quant.ew/files/system/spectator_helps/spectator_helps.lua @@ -5,7 +5,7 @@ local shield_entities = {} rpc.opts_everywhere() rpc.opts_reliable() function rpc.add_shield(target) - if GameHasFlagRun("ending_game_completed") then + if GameHasFlagRun("ending_game_completed") or target == nil or ctx.players[target] == nil then return end local entity = ctx.players[target].entity