Переглянути джерело

BETA: Minor null pointer vulnerability fix.
* Reported by: lucan

Zoey76 12 роки тому
батько
коміт
52fbe02926

+ 3 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/WalkingManager.java

@@ -110,7 +110,8 @@ public class WalkingManager extends DocumentParser
 	}
 	
 	/**
-	 * Holds info about current walk progress
+	 * Holds info about current walk progress.<br>
+	 * Zoey76: TODO: Move to own file, and use getters and setters.
 	 */
 	private class WalkInfo
 	{
@@ -456,7 +457,7 @@ public class WalkingManager extends DocumentParser
 			else
 			// walk was stopped due to some reason (arrived to node, script action, fight or something else), resume it
 			{
-				if ((npc.getAI().getIntention() == CtrlIntention.AI_INTENTION_ACTIVE) || (npc.getAI().getIntention() == CtrlIntention.AI_INTENTION_IDLE))
+				if (_activeRoutes.containsKey(npc.getObjectId()) && ((npc.getAI().getIntention() == CtrlIntention.AI_INTENTION_ACTIVE) || (npc.getAI().getIntention() == CtrlIntention.AI_INTENTION_IDLE)))
 				{
 					WalkInfo walk = _activeRoutes.get(npc.getObjectId());