Prevent getAI NPE.
Contributed by Sahar.
This commit is contained in:
@@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2250,7 +2250,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = new CreatureAI(new AIAccessor());
|
_ai = ai = new CreatureAI(new AIAccessor());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2505,7 +2505,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2507,7 +2507,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -1748,7 +1748,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -1748,7 +1748,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -1748,7 +1748,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -1749,7 +1749,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -1748,7 +1748,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
if (_ai == null)
|
ai = _ai;
|
||||||
|
if (ai == null)
|
||||||
{
|
{
|
||||||
_ai = ai = initAI();
|
_ai = ai = initAI();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user