From ccf6e78cd5d8b94eb3c2f9df1eff5ed77eb9cb23 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 19 Aug 2021 22:28:54 +0100 Subject: [PATCH] It is legal to have nullptr zones in the m_CopperZoneRTreeCache. (Though we might want to re-think this strategy....) Fixes https://gitlab.com/kicad/code/kicad/-/issues/15853 --- pcbnew/drc/drc_test_provider_connection_width.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/drc/drc_test_provider_connection_width.cpp b/pcbnew/drc/drc_test_provider_connection_width.cpp index abfd7c1b28..7749e072c4 100644 --- a/pcbnew/drc/drc_test_provider_connection_width.cpp +++ b/pcbnew/drc/drc_test_provider_connection_width.cpp @@ -741,7 +741,8 @@ bool DRC_TEST_PROVIDER_CONNECTION_WIDTH::Run() for( auto& [ zone, rtree ] : board->m_CopperZoneRTreeCache ) { - if( !rtree->GetObjectsAt( location, aLayer, aMinWidth ).empty() + if( rtree + && !rtree->GetObjectsAt( location, aLayer, aMinWidth ).empty() && zone->HitTestFilledArea( aLayer, location, aMinWidth ) ) { contributingItems.push_back( zone );