prevent crash on unknown nodes
This commit is contained in:
parent
895d9e1e15
commit
781d20e312
@ -174,7 +174,7 @@ end
|
||||
-- returns true if the node has an "epic" definition
|
||||
epic.is_epic = function(node)
|
||||
local nodedef = minetest.registered_nodes[node.name]
|
||||
return nodedef.epic ~= nil
|
||||
return nodedef and nodedef.epic
|
||||
end
|
||||
|
||||
-- executes an epic function
|
||||
|
Loading…
x
Reference in New Issue
Block a user