eagle: Fix segfault importing flipped footprints
We don't have a board reference when importing, so we don't get settings for flip orientation.
This commit is contained in:
parent
2c5876ee8c
commit
5ff7c61003
|
@ -2215,7 +2215,12 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri
|
|||
module->SetOrientation( 0 );
|
||||
|
||||
if( module->GetLayer() != F_Cu )
|
||||
module->Flip( module->GetPosition(), m_board->GeneralSettings().m_FlipLeftRight );
|
||||
{
|
||||
if( m_board != nullptr )
|
||||
module->Flip( module->GetPosition(), m_board->GeneralSettings().m_FlipLeftRight );
|
||||
else
|
||||
module->Flip( module->GetPosition(), false );
|
||||
}
|
||||
|
||||
wxLogTrace( traceKicadPcbPlugin, wxT( "Creating s-expr footprint file '%s'." ), fullPath );
|
||||
mods.insert( footprintName, new FP_CACHE_ITEM( module, WX_FILENAME( fn.GetPath(), fullName ) ) );
|
||||
|
|
Loading…
Reference in New Issue