From dae251bd802fa555f680437a8ba262dfdefb9874 Mon Sep 17 00:00:00 2001 From: general Date: Sat, 6 Apr 2024 12:38:25 -0400 Subject: [PATCH] check user validation on use to avoid crash on disconected --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index 99567ea..bd551f8 100755 --- a/init.lua +++ b/init.lua @@ -235,6 +235,7 @@ minetest.register_tool("mobs_balrog:balrog_whip", { minetest.get_background_escape_sequence("darkred"), inventory_image = "mobs_balrog_balrog_whip.png^[transform3", on_use = function(itemstack, user, pointed_thing) + if not user then return end if pointed_thing.type == "nothing" then local dir = user:get_look_dir() local pos = user:get_pos()