Fix node == nil bug. Reported on the forums.

This commit is contained in:
Splizard 2014-10-27 10:36:35 +13:00
parent 4d696c4843
commit 37ecfd02a8
1 changed files with 5 additions and 0 deletions

View File

@ -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