diff --git a/pcbnew/drc_clearance_test_functions.cpp b/pcbnew/drc_clearance_test_functions.cpp index f8fa8db004..2e3d6fafc8 100644 --- a/pcbnew/drc_clearance_test_functions.cpp +++ b/pcbnew/drc_clearance_test_functions.cpp @@ -274,9 +274,11 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads ) { unsigned pad_count = m_pcb->GetPadCount(); + auto pads = m_pcb->GetPads(); + for( unsigned ii = 0; iiGetPad( ii ); + D_PAD* pad = pads[ii]; /* No problem if pads are on an other layer, * But if a drill hole exists (a pad on a single layer can have a hole!)