diff --git a/pcbnew/footprint_libraries_utils.cpp b/pcbnew/footprint_libraries_utils.cpp index df9ad8eb43..25b9a18f10 100644 --- a/pcbnew/footprint_libraries_utils.cpp +++ b/pcbnew/footprint_libraries_utils.cpp @@ -867,7 +867,6 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard( bool aAddNew ) // update footprint in the current board, // not just add it to the board with total disregard for the netlist... PCB_EDIT_FRAME* pcbframe = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB_EDITOR, false ); - TOOL_MANAGER* toolMgr = pcbframe->GetToolManager(); if( pcbframe == nullptr ) // happens when the board editor is not active (or closed) { @@ -875,6 +874,7 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard( bool aAddNew ) return false; } + TOOL_MANAGER* toolMgr = pcbframe->GetToolManager(); BOARD* mainpcb = pcbframe->GetBoard(); FOOTPRINT* sourceFootprint = nullptr; FOOTPRINT* editorFootprint = GetBoard()->GetFirstFootprint(); diff --git a/pcbnew/tools/board_editor_control.cpp b/pcbnew/tools/board_editor_control.cpp index f896f80598..298518ce96 100644 --- a/pcbnew/tools/board_editor_control.cpp +++ b/pcbnew/tools/board_editor_control.cpp @@ -177,6 +177,7 @@ BOARD_EDITOR_CONTROL::BOARD_EDITOR_CONTROL() : PCB_TOOL_BASE( "pcbnew.EditorControl" ), m_frame( nullptr ), m_inPlaceFootprint( false ), + m_placingFootprint( false ), m_inPlaceTarget( false ) { m_placeOrigin = std::make_unique( KIGFX::COLOR4D( 0.8, 0.0, 0.0, 1.0 ),