Pcbnew: fix crash when selecting a footprint due to a not initialized pointer

This commit is contained in:
jean-pierre charras 2023-06-13 11:37:12 +02:00
parent d77180d9b5
commit bdc9807dee
1 changed files with 2 additions and 2 deletions

View File

@ -2511,10 +2511,10 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
break;
case PCB_FP_TEXT_T:
text = static_cast<const FP_TEXT*>( aItem );
if( m_isFootprintEditor )
{
text = static_cast<const FP_TEXT*>( aItem );
if( !text->IsVisible() && !view()->IsLayerVisible( LAYER_MOD_TEXT_INVISIBLE ) )
return false;