From b5c73145dff317a21044d1bbafb3069037a04980 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 19 Aug 2018 12:30:55 +0200 Subject: [PATCH] prediction: abort on invalid values --- modules/prediction.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/prediction.lua b/modules/prediction.lua index b6b71c0c..efa22144 100644 --- a/modules/prediction.lua +++ b/modules/prediction.lua @@ -78,6 +78,10 @@ pfUI:RegisterModule("prediction", function () end function pfUI.prediction:Heal(sender, target, amount, duration) + if not sender or not target or not amount or not duration then + return + end + local timeout = duration/1000 + GetTime() heals[target] = heals[target] or {} heals[target][sender] = { amount, timeout }