Browse Source

Nullptr safety.

KICAD-7DX
revert-0c36e162
Jeff Young 8 months ago
parent
commit
5e0beb97ee
  1. 9
      pcbnew/tools/footprint_editor_control.cpp

9
pcbnew/tools/footprint_editor_control.cpp

@ -529,8 +529,12 @@ int FOOTPRINT_EDITOR_CONTROL::RenameFootprint( const TOOL_EVENT& aEvent )
}
wxDataViewItem treeItem = m_frame->GetLibTreeAdapter()->FindItem( fpID );
m_frame->UpdateLibraryTree( treeItem, footprint );
m_frame->FocusOnLibID( LIB_ID( libraryName, newName ) );
if( footprint )
{
m_frame->UpdateLibraryTree( treeItem, footprint );
m_frame->FocusOnLibID( LIB_ID( libraryName, newName ) );
}
return 0;
}
@ -636,6 +640,7 @@ int FOOTPRINT_EDITOR_CONTROL::OpenDirectory( const TOOL_EVENT& aEvent )
if( !path.IsEmpty() && wxDirExists( path ) )
LaunchExternal( path );
return 0;
}

Loading…
Cancel
Save