FP editor: fix crash when duplicating a footprint.

Fixes #12098
https://gitlab.com/kicad/code/kicad/issues/12098
This commit is contained in:
jean-pierre charras 2022-07-27 19:08:27 +02:00
parent 759069f487
commit aabc3b3cc6
1 changed files with 1 additions and 1 deletions

View File

@ -377,7 +377,7 @@ int FOOTPRINT_EDITOR_CONTROL::DuplicateFootprint( const TOOL_EVENT& aEvent )
if( footprint && m_frame->DuplicateFootprint( footprint ) ) if( footprint && m_frame->DuplicateFootprint( footprint ) )
{ {
m_frame->SyncLibraryTree( true ); m_frame->SyncLibraryTree( true );
m_frame->LoadFootprintFromLibrary( m_copiedFootprint->GetFPID() ); m_frame->LoadFootprintFromLibrary( footprint->GetFPID() );
m_frame->FocusOnLibID( footprint->GetFPID() ); m_frame->FocusOnLibID( footprint->GetFPID() );
m_frame->RefreshLibraryTree(); m_frame->RefreshLibraryTree();
} }