Core/Movement: Add safety check to avoid C++ undefined behaviour

(cherry picked from commit 67f28adaf738ebf1377d06adac2fa30033928dd6)
This commit is contained in:
jackpoz
2022-01-01 12:42:31 +01:00
committed by Shauren
parent d18d2b84f2
commit 33e495983b
+2 -1
View File
@@ -1112,7 +1112,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()