Clear ratsnest when removing nets
While we can keep the vector for nets, we need to ensure that the data are cleared to prevent stale pointer access Fixes https://gitlab.com/kicad/code/kicad/issues/12564
This commit is contained in:
parent
9186be600b
commit
15d52c91e4
|
@ -209,6 +209,11 @@ void CONNECTIVITY_DATA::RecalculateRatsnest( BOARD_COMMIT* aCommit )
|
|||
for( unsigned int i = prevSize; i < m_nets.size(); i++ )
|
||||
m_nets[i] = new RN_NET;
|
||||
}
|
||||
else
|
||||
{
|
||||
for( size_t ii = lastNet; ii < m_nets.size(); ++ii )
|
||||
m_nets[ii]->Clear();
|
||||
}
|
||||
|
||||
const std::vector<std::shared_ptr<CN_CLUSTER>>& clusters = m_connAlgo->GetClusters();
|
||||
|
||||
|
|
Loading…
Reference in New Issue