Fix crash where dummy edge doesn't have a valid parent.

This commit is contained in:
Jeff Young 2020-08-12 23:53:00 +01:00
parent c36080a250
commit 0c9d08249f
2 changed files with 2 additions and 0 deletions

View File

@ -501,6 +501,7 @@ void DRC::testPadClearances( BOARD_COMMIT& aCommit )
m_clearanceSource = _( "board edge" );
static DRAWSEGMENT dummyEdge;
dummyEdge.SetParent( m_pcb );
dummyEdge.SetLayer( Edge_Cuts );
pad->GetRuleClearance( &dummyEdge, pad->GetLayer(), &minClearance, &m_clearanceSource );

View File

@ -496,6 +496,7 @@ void DRC::doTrackDrc( BOARD_COMMIT& aCommit, TRACK* aRefSeg, TRACKS::iterator aS
m_clearanceSource = _( "board edge" );
static DRAWSEGMENT dummyEdge;
dummyEdge.SetParent( m_pcb );
dummyEdge.SetLayer( Edge_Cuts );
aRefSeg->GetRuleClearance( &dummyEdge, aRefSeg->GetLayer(), &minClearance,