PLAYERTASK - nil check for client messaging

This commit is contained in:
Applevangelist 2024-07-28 12:43:57 +02:00
parent 03cd390baf
commit fb31c25ab7

View File

@ -1973,7 +1973,9 @@ function PLAYERTASKCONTROLLER:_SendMessageToClients(Text,Seconds)
local seconds = Seconds or 10
self.ClientSet:ForEachClient(
function (Client)
local m = MESSAGE:New(Text,seconds,"Tasking"):ToClient(Client)
if Client ~= nil and Client:IsActive() then
local m = MESSAGE:New(Text,seconds,"Tasking"):ToClient(Client)
end
end
)
return self