Core/Movement: Fix a potential crash on newly created pets.
Port From (https://github.com/TrinityCore/TrinityCore/commit/3d9d6fbcb80eaab72acbe6ef09b9b1c29f2439c7)
This commit is contained in:
@@ -804,6 +804,11 @@ namespace Game.Movement
|
||||
|
||||
int Size() { return _top + 1; }
|
||||
|
||||
public IMovementGenerator TopOrNull()
|
||||
{
|
||||
return Empty() ? null : Top();
|
||||
}
|
||||
|
||||
public IMovementGenerator Top()
|
||||
{
|
||||
Cypher.Assert(!Empty());
|
||||
|
||||
Reference in New Issue
Block a user