Browse Source

Fix crash when deleting from library with nothing selected.

Fixes: lp:1775289
* https://bugs.launchpad.net/kicad/+bug/1775289
pull/17/head
Jeff Young 8 years ago
parent
commit
271826f8f3
  1. 8
      pcbnew/load_select_footprint.cpp

8
pcbnew/load_select_footprint.cpp

@ -490,19 +490,15 @@ wxString PCB_BASE_FRAME::SelectFootprint( EDA_DRAW_FRAME* aWindow,
if( dlg.ShowModal() == wxID_OK )
{
fpname = dlg.GetTextSelection();
fpname = dlg.GetTextSelection( 1 ) + wxT( ":" ) + fpname;
if( !dlg.GetTextSelection( 0 ).IsEmpty() )
fpname = dlg.GetTextSelection( 1 ) + wxT( ":" ) + dlg.GetTextSelection( 0 );
SkipNextLeftButtonReleaseEvent();
}
else
fpname.Empty();
}
else
{
DisplayError( aWindow, _( "No footprint found." ) );
fpname.Empty();
}
if( fpname != wxEmptyString )

Loading…
Cancel
Save