fix void item crash

master
AiTechEye 2018-07-27 12:44:29 +02:00 committed by GitHub
parent ff7e2acbbe
commit 689fc76cf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -922,8 +922,10 @@ minetest.register_entity("aliveai_massdestruction:blackhole",{
elseif np then elseif np then
if not aliveai_nitroglycerine.spawn_dust(np) then if not aliveai_nitroglycerine.spawn_dust(np) then
local nn=minetest.get_node(np).name local nn=minetest.get_node(np).name
if nn then if nn and np then
minetest.add_item(np, nn):get_luaentity().age=890 local e=minetest.add_item(np, nn)
if not e then return end
e:get_luaentity().age=890
end end
end end
minetest.remove_node(np) minetest.remove_node(np)