Fix crash in cvpcb when filtering by component with no components

Fixes: lp:1656685
* https://bugs.launchpad.net/kicad/+bug/1656685
This commit is contained in:
Chris Pavlina 2017-03-26 18:48:14 -04:00
parent 0f0cb64a63
commit ef11d110b2
1 changed files with 2 additions and 2 deletions

View File

@ -137,10 +137,10 @@ void FOOTPRINTS_LISTBOX::SetFootprints( FOOTPRINT_LIST& aList, const wxString& a
FOOTPRINT_FILTER filter( aList ); FOOTPRINT_FILTER filter( aList );
if( aFilterType & FILTERING_BY_COMPONENT_KEYWORD ) if( aFilterType & FILTERING_BY_COMPONENT_KEYWORD && aComponent )
filter.FilterByFootprintFilters( aComponent->GetFootprintFilters() ); filter.FilterByFootprintFilters( aComponent->GetFootprintFilters() );
if( aFilterType & FILTERING_BY_PIN_COUNT ) if( aFilterType & FILTERING_BY_PIN_COUNT && aComponent )
filter.FilterByPinCount( aComponent->GetNetCount() ); filter.FilterByPinCount( aComponent->GetNetCount() );
if( aFilterType & FILTERING_BY_LIBRARY ) if( aFilterType & FILTERING_BY_LIBRARY )