From 0951de24e2e005a939319e8719116b7addb50f92 Mon Sep 17 00:00:00 2001 From: GreenComfyTea Date: Tue, 26 Sep 2023 11:32:18 +0300 Subject: [PATCH] Check for null in time.remove_delay_timer() --- reframework/autorun/MHR_Overlay/Game_Handler/time.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reframework/autorun/MHR_Overlay/Game_Handler/time.lua b/reframework/autorun/MHR_Overlay/Game_Handler/time.lua index 237d13e..454fad7 100644 --- a/reframework/autorun/MHR_Overlay/Game_Handler/time.lua +++ b/reframework/autorun/MHR_Overlay/Game_Handler/time.lua @@ -72,7 +72,6 @@ function this.new_timer(callback, cooldown_seconds, start_offset_seconds) timer.last_trigger_time = os.clock() + start_offset_seconds; this.timer_list[callback] = timer; - end function this.new_delay_timer(callback, delay) @@ -89,10 +88,13 @@ function this.new_delay_timer(callback, delay) this.delay_timer_list[callback] = delay_timer; return delay_timer; - end function this.remove_delay_timer(delay_timer) + if delay_timer == nil then + return; + end + this.delay_timer_list[delay_timer.callback] = nil; end