prevent crash on unknown nodes

This commit is contained in:
Buckaroo Banzai 2021-05-10 08:29:54 +02:00 committed by GitHub
parent 895d9e1e15
commit 781d20e312
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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