RemoveWaypoint throws collection modified error
Reported
Calling RemoveWaypoint on a MyBasicMissionAutopilot throws a System.InvalidOperationException since the collection is modified. The subject code is below- seems the raised event is altering the m_waypoints collection while it's still being iterated.
public void RemoveWaypoint(IMyAutopilotWaypoint waypoint) { foreach (MyAutopilotWaypoint waypoint2 in m_waypoints) { if (waypoint == waypoint2) { MyMultiplayer.RaiseEvent(this, (MyBasicMissionAutopilot x) => x.RemoveWaypoints, new int[1] { m_waypoints.IndexOf(waypoint2) }); } } }
Hello BDCarrillo,
Thank you for reaching our forum and letting us know about this issue.
We have added this issue into our internal system.
Kind Regards,
Keen Software House: QA Department
Hello BDCarrillo,
Thank you for reaching our forum and letting us know about this issue.
We have added this issue into our internal system.
Kind Regards,
Keen Software House: QA Department
Replies have been locked on this page!