From 09ee912096b9f5f8395ba36766d432195652265e Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 29 Aug 2020 10:53:44 +0200 Subject: [PATCH] Fix crash when mob dies after poison/regen --- mods/ITEMS/mcl_potions/functions.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua index 99d39b95d9..dab96351e1 100644 --- a/mods/ITEMS/mcl_potions/functions.lua +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -87,7 +87,7 @@ minetest.register_globalstep(function(dtime) end - if is_poisoned[player].timer >= is_poisoned[player].dur then + if is_poisoned[player] and is_poisoned[player].timer >= is_poisoned[player].dur then is_poisoned[player] = nil if is_player then meta = player:get_meta() @@ -123,7 +123,7 @@ minetest.register_globalstep(function(dtime) end - if is_regenerating[player].timer >= is_regenerating[player].dur then + if is_regenerating[player] and is_regenerating[player].timer >= is_regenerating[player].dur then is_regenerating[player] = nil if is_player then meta = player:get_meta()