From 37ecfd02a8d7cf5e0c743e9f9782e9be0551baf8 Mon Sep 17 00:00:00 2001 From: Splizard Date: Mon, 27 Oct 2014 10:36:35 +1300 Subject: [PATCH] Fix node == nil bug. Reported on the forums. --- init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init.lua b/init.lua index eee1262..ccfa3cf 100644 --- a/init.lua +++ b/init.lua @@ -86,6 +86,11 @@ function snow.place(pos) if node and minetest.registered_nodes[node.name] then drawtype = minetest.registered_nodes[node.name].drawtype end + + --Oops, maybe there is no node? + if node == nil then + return + end local bnode = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}) if node.name == "default:snow" and minetest.get_node_level(pos) < 63 then