Prevent getAI NPE.

Contributed by Sahar.
This commit is contained in:
MobiusDevelopment
2019-11-04 20:31:47 +00:00
parent eaa8f64803
commit a7d7160fce
18 changed files with 36 additions and 18 deletions

View File

@ -2250,7 +2250,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
{
synchronized (this)
{
if (_ai == null)
ai = _ai;
if (ai == null)
{
_ai = ai = new CreatureAI(new AIAccessor());
}