mirror of
https://github.com/minetest-mods/item_drop.git
synced 2024-09-12 07:48:38 +02:00
Fix crash when trying to spawn an unknown item
This commit is contained in:
parent
d3687f027a
commit
dd01ddf5ff
5
init.lua
5
init.lua
@ -320,8 +320,9 @@ and not minetest.settings:get_bool("creative_mode") then
|
|||||||
name = item:get_name()
|
name = item:get_name()
|
||||||
end
|
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
|
count = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user