From aabc3b3cc6913de79c3dae854f0d9580f2e0d25f Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 27 Jul 2022 19:08:27 +0200 Subject: [PATCH] FP editor: fix crash when duplicating a footprint. Fixes #12098 https://gitlab.com/kicad/code/kicad/issues/12098 --- pcbnew/tools/footprint_editor_control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/footprint_editor_control.cpp b/pcbnew/tools/footprint_editor_control.cpp index 9482e9a88c..c7162d254f 100644 --- a/pcbnew/tools/footprint_editor_control.cpp +++ b/pcbnew/tools/footprint_editor_control.cpp @@ -377,7 +377,7 @@ int FOOTPRINT_EDITOR_CONTROL::DuplicateFootprint( const TOOL_EVENT& aEvent ) if( footprint && m_frame->DuplicateFootprint( footprint ) ) { m_frame->SyncLibraryTree( true ); - m_frame->LoadFootprintFromLibrary( m_copiedFootprint->GetFPID() ); + m_frame->LoadFootprintFromLibrary( footprint->GetFPID() ); m_frame->FocusOnLibID( footprint->GetFPID() ); m_frame->RefreshLibraryTree(); }