Core/Movement: fixed a crash in MotionMaster that was caused in combination with MovementInform and DoZoneInCombat

This commit is contained in:
Ovahlord
2019-08-04 03:24:19 +02:00
parent d91243190c
commit f526fc9768

View File

@@ -154,7 +154,10 @@ MovementGeneratorType MotionMaster::GetCurrentMovementGeneratorType() const
if (empty())
return IDLE_MOTION_TYPE;
return top()->GetMovementGeneratorType();
if (topOrNull())
return top()->GetMovementGeneratorType();
else
return IDLE_MOTION_TYPE;
}
MovementGeneratorType MotionMaster::GetMotionSlotType(MovementSlot slot) const