mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Core/Movement: Add safety check to avoid C++ undefined behaviour
This commit is contained in:
@@ -1056,7 +1056,8 @@ void MotionMaster::Remove(MotionMasterContainer::iterator iterator, bool active,
|
||||
|
||||
void MotionMaster::Pop(bool active, bool movementInform)
|
||||
{
|
||||
Remove(_generators.begin(), active, movementInform);
|
||||
if (!_generators.empty())
|
||||
Remove(_generators.begin(), active, movementInform);
|
||||
}
|
||||
|
||||
void MotionMaster::DirectInitialize()
|
||||
|
||||
Reference in New Issue
Block a user