Not sure what to make of this:
java.lang.NullPointerException
at greenfoot.collision.ibsp.IBSPColChecker.getOneIntersectingObject(IBSPColChecker.java:831)
at greenfoot.collision.ColManager.getOneIntersectingObject(ColManager.java:188)
at greenfoot.World.getOneIntersectingObject(World.java:749)
at greenfoot.Actor.getOneIntersectingObject(Actor.java:906)
at Enemy.detectCollisions(Enemy.java:164)
at Enemy.act(Enemy.java:60)
at ElectricSpark.act(ElectricSpark.java:28)
at greenfoot.core.Simulation.actActor(Simulation.java:507)
at greenfoot.core.Simulation.runOneLoop(Simulation.java:470)
at greenfoot.core.Simulation.runContent(Simulation.java:204)
at greenfoot.core.Simulation.run(Simulation.java:194)
Anyway, I was checking my scenario for bugs and this happened, right after I died in my game. The detectCollisions method just checks for the player via getOneIntersectingObject and doesn't do anything if the player is null, so I don't know if it's a problem with my code or what. Any advice on how to prevent something like this?

