From 2b2e73bf9827177b141be4143628213896299cd9 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 25 Jul 2017 01:25:54 +0200 Subject: [PATCH] Fix sign crashes --- mods/ITEMS/signs/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/signs/init.lua b/mods/ITEMS/signs/init.lua index dcc4f82b..bbcc270b 100644 --- a/mods/ITEMS/signs/init.lua +++ b/mods/ITEMS/signs/init.lua @@ -153,11 +153,14 @@ local update_sign = function(pos, fields, sender) end local owner = meta:get_string("owner") local text = meta:get_string("text") - if fields and sender:get_player_name() == owner or text == "" and fields then + if fields and (sender:get_player_name() == owner or (text == "" and fields.text)) then meta:set_string("text", fields.text) text = fields.text meta:set_string("owner", sender:get_player_name() or "") end + if text == nil then + text = "" + end local objects = minetest.get_objects_inside_radius(pos, 0.5) for _, v in ipairs(objects) do if v:get_entity_name() == "signs:text" then