Browse Source

Fixed a memleak in PCB_EDIT_FRAME::LoadFootprints()

pull/5/merge
Maciej Suminski 8 years ago
parent
commit
e8e10c9245
  1. 7
      pcbnew/netlist.cpp

7
pcbnew/netlist.cpp

@ -284,9 +284,10 @@ void PCB_EDIT_FRAME::LoadFootprints( NETLIST& aNetlist, REPORTER* aReporter )
if( !aNetlist.GetReplaceFootprints() )
footprintMisMatch = false;
bool loadFootprint = (fpOnBoard == NULL) || footprintMisMatch;
if( fpOnBoard && !footprintMisMatch ) // nothing else to do here
continue;
if( loadFootprint && (component->GetFPID() != lastFPID) )
if( component->GetFPID() != lastFPID )
{
module = NULL;
@ -340,7 +341,7 @@ void PCB_EDIT_FRAME::LoadFootprints( NETLIST& aNetlist, REPORTER* aReporter )
module = new MODULE( *module );
}
if( loadFootprint && module != NULL )
if( module )
component->SetModule( module );
}
}
Loading…
Cancel
Save