summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-07-20 01:44:27 -0400
committerGitHub <noreply@github.com>2017-07-20 01:44:27 -0400
commit217ea08cac5e8e68ed09e149f987e5f4ca0c09ca (patch)
treee13a44f86bc1f568b7e9256d6529f1e007caaadb
parent3e001599a65160cc50dd4a49211f2376521576dd (diff)
parentcba3e847d991ac24f0cd4b985cabba3088f89975 (diff)
downloadsigns_lib-217ea08cac5e8e68ed09e149f987e5f4ca0c09ca.tar.gz
signs_lib-217ea08cac5e8e68ed09e149f987e5f4ca0c09ca.tar.bz2
signs_lib-217ea08cac5e8e68ed09e149f987e5f4ca0c09ca.zip
Merge pull request #20 from tenplus1/patch-1
add nil check
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 775db95..270af71 100644
--- a/init.lua
+++ b/init.lua
@@ -413,7 +413,7 @@ end
local function set_obj_text(obj, text, new, pos)
local split = new and split_lines_and_words or split_lines_and_words_old
local n = minetest.registered_nodes[minetest.get_node(pos).name]
- local text_scale = n.text_scale or DEFAULT_TEXT_SCALE
+ local text_scale = (n and n.text_scale) or DEFAULT_TEXT_SCALE
obj:set_properties({
textures={make_sign_texture(split(text), pos)},
visual_size = text_scale,