7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-11 14:20:10 +00:00

Handle error when we don't have Eagle Board

This can also occur in libraries, so ensure we're not dereferencing a
null board pointer

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18702
This commit is contained in:
Seth Hillbrand 2024-09-13 16:03:58 -07:00
parent 1a6b309ad6
commit 89b9b13e21

View File

@ -2050,7 +2050,12 @@ void PCB_IO_EAGLE::packagePad( FOOTPRINT* aFootprint, wxXmlNode* aTree )
}
else
{
wxLogError( _( "Invalid zero-sized pad ignored in\nfile: %s" ), m_board->GetFileName() );
wxFileName fileName( m_lib_path );
if( m_board)
wxLogError( _( "Invalid zero-sized pad ignored in\nfile: %s" ), m_board->GetFileName() );
else
wxLogError( _( "Invalid zero-sized pad ignored in\nfile: %s" ), fileName.GetFullName() );
}
}