From 4ff6b55e42257c86cf3ccecb6ba55597de9184e6 Mon Sep 17 00:00:00 2001 From: Thomas Rudin <thomas@rudin.io> Date: Mon, 27 Jan 2020 19:49:59 +0100 Subject: [PATCH] check item for nil --- search.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/search.lua b/search.lua index 4166ceb..87cbf19 100644 --- a/search.lua +++ b/search.lua @@ -34,6 +34,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end local item = selected_item_data[playername] + if not item then + return + end if fields.teleport then if not minetest.check_player_privs(playername, "teleport") then -- GitLab