Browse Source

BETA: Fixing NPE vulnerability from [6511].

Reported by: Cresceus, Sdw
Zoey76 11 years ago
parent
commit
4092476240

+ 3 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/instance/L2BabyPetInstance.java

@@ -256,6 +256,7 @@ public final class L2BabyPetInstance extends L2PetInstance
 			{
 				return;
 			}
+			
 			// If the pet doesn't meet the conditions avoid casting.
 			if (_baby.isCastingNow() || _baby.isBetrayed() || _baby.isMuted() || _baby.isOutOfControl() || !_bufferMode || (_baby.getAI().getIntention() == CtrlIntention.AI_INTENTION_CAST))
 			{
@@ -322,8 +323,9 @@ public final class L2BabyPetInstance extends L2PetInstance
 						{
 							continue;
 						}
+						
 						// If owner have the buff blocked, continue.
-						if (owner.getEffectList().getAllBlockedBuffSlots().contains(skill.getAbnormalType()))
+						if ((owner.getEffectList().getAllBlockedBuffSlots() != null) && owner.getEffectList().getAllBlockedBuffSlots().contains(skill.getAbnormalType()))
 						{
 							continue;
 						}