diff --git a/trunk/dist/game/data/scripts/ai/fantasy_isle/Parade.java b/trunk/dist/game/data/scripts/ai/fantasy_isle/Parade.java index 2d735a1624..b3511e8423 100644 --- a/trunk/dist/game/data/scripts/ai/fantasy_isle/Parade.java +++ b/trunk/dist/game/data/scripts/ai/fantasy_isle/Parade.java @@ -223,14 +223,17 @@ public class Parade extends AbstractNpcAI for (Iterator it = spawns.iterator(); it.hasNext();) { L2Npc actor = it.next(); - if (actor.calculateDistance(actor.getXdestination(), actor.getYdestination(), 0, false, true) < (100 * 100)) + if (actor != null) { - actor.deleteMe(); - it.remove(); - } - else if (!actor.isMoving()) - { - actor.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(actor.getXdestination(), actor.getYdestination(), actor.getZdestination(), actor.getHeading())); + if (actor.calculateDistance(actor.getXdestination(), actor.getYdestination(), 0, false, true) < (100 * 100)) + { + actor.deleteMe(); + it.remove(); + } + else if (!actor.isMoving()) + { + actor.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(actor.getXdestination(), actor.getYdestination(), actor.getZdestination(), actor.getHeading())); + } } } if (spawns.size() == 0)