From bdc9807deed5c723e56d810c8d3e39ac317157dd Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 13 Jun 2023 11:37:12 +0200 Subject: [PATCH] Pcbnew: fix crash when selecting a footprint due to a not initialized pointer --- pcbnew/tools/pcb_selection_tool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/pcb_selection_tool.cpp b/pcbnew/tools/pcb_selection_tool.cpp index 7313d701b5..2755f431f2 100644 --- a/pcbnew/tools/pcb_selection_tool.cpp +++ b/pcbnew/tools/pcb_selection_tool.cpp @@ -2511,10 +2511,10 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili break; case PCB_FP_TEXT_T: + text = static_cast( aItem ); + if( m_isFootprintEditor ) { - text = static_cast( aItem ); - if( !text->IsVisible() && !view()->IsLayerVisible( LAYER_MOD_TEXT_INVISIBLE ) ) return false;