7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-14 12:49:34 +00:00

router: fix assertion in multidragger (link count out of range)

Fixes https://gitlab.com/kicad/code/kicad/issues/19587
This commit is contained in:
Tomasz Wlostowski 2025-01-11 18:11:00 +01:00
parent 0748cd03be
commit b54235262a

View File

@ -424,7 +424,7 @@ void MULTI_DRAGGER::restoreLeaderSegments( std::vector<MDRAG_LINE>& aCompletedLi
else
{
int newLeaderIdx = findNewLeaderSegment( l );
if( newLeaderIdx >= 0 )
if( newLeaderIdx >= 0 && newLeaderIdx < l.draggedLine.LinkCount() )
{
m_leaderSegments.push_back(
static_cast<PNS::ITEM*>( l.draggedLine.GetLink( newLeaderIdx ) ) );