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

(cherry picked from commit 89b9b13e21)
This commit is contained in:
Seth Hillbrand
2024-09-13 16:03:58 -07:00
parent fdb3612565
commit 7ca472deb8
+6 -1
View File
@@ -2035,7 +2035,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() );
}
}