Fixed possible L2AttackableAI thinkAttack NPE.

This commit is contained in:
MobiusDev 2017-09-15 14:29:06 +00:00
parent 7460f22861
commit e44fbf0218
5 changed files with 5 additions and 5 deletions

View File

@ -575,7 +575,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
{
final L2Attackable npc = getActiveChar();
if (npc.isCastingNow())
if ((npc == null) || npc.isCastingNow())
{
return;
}

View File

@ -575,7 +575,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
{
final L2Attackable npc = getActiveChar();
if (npc.isCastingNow())
if ((npc == null) || npc.isCastingNow())
{
return;
}

View File

@ -575,7 +575,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
{
final L2Attackable npc = getActiveChar();
if (npc.isCastingNow())
if ((npc == null) || npc.isCastingNow())
{
return;
}

View File

@ -695,7 +695,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
protected void thinkAttack()
{
final L2Attackable npc = getActiveChar();
if (npc.isCastingNow())
if ((npc == null) || npc.isCastingNow())
{
return;
}

View File

@ -575,7 +575,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
{
final L2Attackable npc = getActiveChar();
if (npc.isCastingNow())
if ((npc == null) || npc.isCastingNow())
{
return;
}