diff --git a/pcbnew/tools/board_inspection_tool.cpp b/pcbnew/tools/board_inspection_tool.cpp index 443e7e5bcd..f83b79e38e 100644 --- a/pcbnew/tools/board_inspection_tool.cpp +++ b/pcbnew/tools/board_inspection_tool.cpp @@ -357,9 +357,9 @@ int BOARD_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent ) auto hasHole = []( BOARD_ITEM* aItem ) { - PAD* pad = dynamic_cast( aItem ); + PAD* tmpPad = dynamic_cast( aItem ); - if( pad && pad->GetDrillSizeX() > 0 && pad->GetDrillSizeY() > 0 ) + if( tmpPad && tmpPad->GetDrillSizeX() > 0 && tmpPad->GetDrillSizeY() > 0 ) return true; PCB_VIA* via = dynamic_cast( aItem );