From 811e1d2ee20e76855780394b031941580bc70f0b Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Mon, 9 Feb 2015 12:50:32 -0500 Subject: [PATCH] fix crash if detected light at a node is nil --- nature_classic/global_function.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nature_classic/global_function.lua b/nature_classic/global_function.lua index ec78942..45e567f 100644 --- a/nature_classic/global_function.lua +++ b/nature_classic/global_function.lua @@ -43,7 +43,7 @@ end function nature:grow_node(pos, nodename) if pos ~= nil then - local light_enough = minetest.get_node_light(pos, nil) + local light_enough = (minetest.get_node_light(pos, nil) or 0) >= nature.minimum_growth_light if is_not_young(pos) and light_enough then