From c48fc7ebff647b0e2c95cd953dd4abb331410c55 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Thu, 15 Feb 2024 19:58:21 -0500 Subject: [PATCH] Fix crash due to PCB_SHAPEs not being returned by BOARD::AllConnectedItems Fixes https://gitlab.com/kicad/code/kicad/-/issues/16981 --- pcbnew/board.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pcbnew/board.cpp b/pcbnew/board.cpp index 7c24056289..1989bfee37 100644 --- a/pcbnew/board.cpp +++ b/pcbnew/board.cpp @@ -2269,6 +2269,14 @@ const std::vector BOARD::AllConnectedItems() for( ZONE* zone : Zones() ) items.push_back( zone ); + for( BOARD_ITEM* item : Drawings() ) + { + if( item->Type() == PCB_SHAPE_T ) + { + items.push_back( dynamic_cast( item ) ); + } + } + return items; }