Avoid *nil crash

master
Ward Vandewege 2020-06-27 08:12:18 -04:00 committed by Ward Vandewege
parent 55ee097604
commit 8c31f17365
1 changed files with 1 additions and 1 deletions

View File

@ -333,7 +333,7 @@ aliveai_nitroglycerine.freeze=function(ob)
ob:get_luaentity().destroy=1
ob:punch(ob,1,{full_punch_interval=1,damage_groups={fleshy=hp}})
if ob:get_luaentity().aliveai then
if ob:get_luaentity() and ob:get_luaentity().aliveai then
for _, ob in ipairs(minetest.get_objects_inside_radius(pos, 1)) do
if ob:get_luaentity() and ob:get_luaentity().type and ob:get_luaentity().type=="" then
ob:remove()