Small cleanup

This commit is contained in:
Ian McInerney 2020-09-16 12:06:41 +01:00
parent a53f3899d4
commit 34527630d0
2 changed files with 4 additions and 3 deletions

View File

@ -185,7 +185,7 @@ void PCB_EDIT_FRAME::LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter )
if( component->GetFPID() != lastFPID )
{
module = NULL;
module = nullptr;
// The LIB_ID is ok as long as there is a footprint portion coming the library if
// it's needed. Nickname can be blank.
@ -219,7 +219,7 @@ void PCB_EDIT_FRAME::LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter )
else
{
// Footprint already loaded from a library, duplicate it (faster)
if( module == NULL )
if( !module )
continue; // Module does not exist in any library.
module = new MODULE( *module );

View File

@ -2169,7 +2169,8 @@ void APPEARANCE_CONTROLS::onLayerPresetChanged( wxCommandEvent& aEvent )
m_lastSelectedUserPreset = ( !preset || preset->readOnly ) ? nullptr : preset;
doApplyLayerPreset( *preset );
if( !preset )
doApplyLayerPreset( *preset );
if( !m_currentPreset->name.IsEmpty() )
{