Fix crash when trying to spawn an unknown item

This commit is contained in:
HybridDog 2019-02-01 17:55:12 +01:00
parent d3687f027a
commit dd01ddf5ff
1 changed files with 3 additions and 2 deletions

View File

@ -320,8 +320,9 @@ and not minetest.settings:get_bool("creative_mode") then
name = item:get_name()
end
if name == "" then
-- Sometimes nothing should be dropped
-- Sometimes nothing should be dropped
if name == ""
or not minetest.registered_nodes[name] then
count = 0
end