mirror of
https://github.com/tacigar/maidroid.git
synced 2024-11-13 22:00:23 +01:00
Add nil check for egg_entity
This commit is contained in:
parent
d2899c8672
commit
a29f888a54
|
@ -162,7 +162,9 @@ do -- register egg writer
|
|||
|
||||
local function on_metadata_inventory_take_from_main(pos)
|
||||
local egg_entity = get_nearest_egg_entity(pos)
|
||||
egg_entity.object:remove()
|
||||
if egg_entity then
|
||||
egg_entity.object:remove()
|
||||
end
|
||||
end
|
||||
|
||||
maidroid_tool._aux.register_writer("maidroid_tool:egg_writer", {
|
||||
|
|
Loading…
Reference in New Issue
Block a user