From 7dadf203bfbde3e1a13744ec04b03bcdae3dc317 Mon Sep 17 00:00:00 2001 From: Niklp09 <89982526+Niklp09@users.noreply.github.com> Date: Fri, 28 Apr 2023 15:41:21 +0200 Subject: [PATCH] fix crash when a sign gets placed on unknown node --- signs_api/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/signs_api/init.lua b/signs_api/init.lua index 1bd00d6..8dbb9a4 100644 --- a/signs_api/init.lua +++ b/signs_api/init.lua @@ -212,7 +212,7 @@ function signs_api.register_sign(mod, name, model) on_construct = function(pos) local ndef = minetest.registered_nodes[minetest.get_node(pos).name] local meta = minetest.get_meta(pos) - meta:set_string("font", ndef.display_entities.font_name or + meta:set_string("font", ndef and ndef.display_entities.font_name or font_api.get_default_font_name()) signs_api.set_formspec(pos) display_api.on_construct(pos)