Core/Movement: Fixed possible crash in HomeMovementGenerator

Port From (https://github.com/TrinityCore/TrinityCore/commit/9c63503527944568e13ae6d8cf9e46bd634f7587)
This commit is contained in:
hondacrx
2022-02-27 14:14:04 -05:00
parent 86d1f0ea1c
commit a36cc8ba2e
@@ -78,7 +78,10 @@ namespace Game.AI
owner.LoadCreaturesAddon();
if (owner.IsVehicle())
owner.GetVehicleKit().Reset(true);
owner.GetAI().JustReachedHome();
CreatureAI ai = owner.GetAI();
if (ai != null)
ai.JustReachedHome();
}
}