diff --git a/pcbnew/footprint_libraries_utils.cpp b/pcbnew/footprint_libraries_utils.cpp index e64b1ef37e..e7e2e8a5b4 100644 --- a/pcbnew/footprint_libraries_utils.cpp +++ b/pcbnew/footprint_libraries_utils.cpp @@ -804,7 +804,7 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard( bool aAddNew ) for( auto mod : mainpcb->Modules() ) { - if( module_in_edit->GetLink() == source_module->GetTimeStamp() ) + if( module_in_edit->GetLink() == mod->GetTimeStamp() ) { source_module = mod; break;