Fixed possible L2AttackableAI thinkAttack NPE.
This commit is contained in:
parent
7460f22861
commit
e44fbf0218
@ -575,7 +575,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
{
|
||||
final L2Attackable npc = getActiveChar();
|
||||
|
||||
if (npc.isCastingNow())
|
||||
if ((npc == null) || npc.isCastingNow())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
{
|
||||
final L2Attackable npc = getActiveChar();
|
||||
|
||||
if (npc.isCastingNow())
|
||||
if ((npc == null) || npc.isCastingNow())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
{
|
||||
final L2Attackable npc = getActiveChar();
|
||||
|
||||
if (npc.isCastingNow())
|
||||
if ((npc == null) || npc.isCastingNow())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
|
||||
{
|
||||
final L2Attackable npc = getActiveChar();
|
||||
|
||||
if (npc.isCastingNow())
|
||||
if ((npc == null) || npc.isCastingNow())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user