From f272056f20bd956cef529b80666b42575dfb06db Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 4 Apr 2022 20:09:35 +0100 Subject: [PATCH] Fix assert. --- pcbnew/tools/board_inspection_tool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/board_inspection_tool.cpp b/pcbnew/tools/board_inspection_tool.cpp index e8167fd614..a4f9d3fc18 100644 --- a/pcbnew/tools/board_inspection_tool.cpp +++ b/pcbnew/tools/board_inspection_tool.cpp @@ -556,9 +556,9 @@ int BOARD_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent ) layer = active; else if( hasHole( b ) && a->IsOnLayer( active ) && IsCopperLayer( active ) ) layer = active; - else if( hasHole( a ) && IsCopperLayer( b->GetLayer() ) ) + else if( hasHole( a ) && b->IsOnCopperLayer() ) layer = b->GetLayer(); - else if( hasHole( b ) && IsCopperLayer( a->GetLayer() ) ) + else if( hasHole( b ) && b->IsOnCopperLayer() ) layer = a->GetLayer(); if( layer >= 0 )