entity.get_inventory(1) should just return nil if the entity doesn't have inventory #1, rather than crashing.
this bug report parallels my feature request for some way to find out which inventories an entity has.
requesting invalid inventory for an entity is a crash
Re: requesting invalid inventory for an entity is a crash
Agreed. Implemented for 0.13.
If you want to get ahold of me I'm almost always on Discord.