Actor fly;
fly = getOneObjectAtOffset(0, 0, fly.class);
if (fly != null)
{
World world;
world = getWorld();
world.removeObject(fly);
world.removeObject(this);
Greenfoot.playSound("popbomb2.wav");
}
I have this code to remove a projectile from the world once it destroys an enemy, but whenever it destroys an enemy an error there was an attempt to use the actor's location when it was not in the world, I have it in the projectile class under the act method any suggestions

