1
0
mirror of https://github.com/mt-mods/signs_lib.git synced 2024-12-25 16:50:17 +01:00

Merge pull request #32 from Jat15/patch-unknown

Fix crash if sign is "unknown block"
This commit is contained in:
Vanessa Dannenberg 2018-05-24 23:46:32 -04:00 committed by GitHub
commit a2f7f62bf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -950,7 +950,7 @@ signs_text_on_activate = function(self)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local text = meta:get_string("text") local text = meta:get_string("text")
local new = (meta:get_int("__signslib_new_format") ~= 0) local new = (meta:get_int("__signslib_new_format") ~= 0)
if text then if text and minetest.registered_nodes[minetest.get_node(pos).name] then
text = trim_input(text) text = trim_input(text)
set_obj_text(self.object, text, new, pos) set_obj_text(self.object, text, new, pos)
end end