From 951c550c1eff69acd5fb05e5855ec67f521ea2f8 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Mon, 4 Mar 2024 15:04:02 +0300 Subject: [PATCH] EasyEDA Std PCB: fix crash when Name/Prefix type text is not in a footprint. --- pcbnew/pcb_io/easyeda/pcb_io_easyeda_parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/pcb_io/easyeda/pcb_io_easyeda_parser.cpp b/pcbnew/pcb_io/easyeda/pcb_io_easyeda_parser.cpp index 3889319d8a..316029b425 100644 --- a/pcbnew/pcb_io/easyeda/pcb_io_easyeda_parser.cpp +++ b/pcbnew/pcb_io/easyeda/pcb_io_easyeda_parser.cpp @@ -790,11 +790,11 @@ void PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer( wxString textType = arr[1]; bool add = false; - if( textType == wxS( "P" ) ) + if( footprint && textType == wxS( "P" ) ) { text = footprint->GetField( REFERENCE_FIELD ); } - else if( textType == wxS( "N" ) ) + else if( footprint && textType == wxS( "N" ) ) { text = footprint->GetField( VALUE_FIELD ); }