소스 검색

BETA: Fixing NPE for not existing child door.
* Reported by: Micr0

Rumen Nikiforov 12 년 전
부모
커밋
4f1018619a
1개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. 10 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2DoorInstance.java

+ 10 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2DoorInstance.java

@@ -17,6 +17,7 @@ package com.l2jserver.gameserver.model.actor.instance;
 import java.util.Collection;
 import java.util.Set;
 import java.util.concurrent.Future;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import javolution.util.FastList;
@@ -286,7 +287,15 @@ public class L2DoorInstance extends L2Character
 		_open = open;
 		if (getChildId() > 0)
 		{
-			getSiblingDoor(getChildId()).notifyChildEvent(open);
+			L2DoorInstance sibling = getSiblingDoor(getChildId());
+			if (sibling != null)
+			{
+				sibling.notifyChildEvent(open);
+			}
+			else
+			{
+				_log.log(Level.WARNING, getClass().getSimpleName() + ": cannot find child id: " + getChildId());
+			}
 		}
 	}