From ef11d110b27207fbb42f4a0cb7b93e44e225bf46 Mon Sep 17 00:00:00 2001 From: Chris Pavlina Date: Sun, 26 Mar 2017 18:48:14 -0400 Subject: [PATCH] Fix crash in cvpcb when filtering by component with no components Fixes: lp:1656685 * https://bugs.launchpad.net/kicad/+bug/1656685 --- cvpcb/class_footprints_listbox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cvpcb/class_footprints_listbox.cpp b/cvpcb/class_footprints_listbox.cpp index 1b0d0320c5..304d3567e0 100644 --- a/cvpcb/class_footprints_listbox.cpp +++ b/cvpcb/class_footprints_listbox.cpp @@ -137,10 +137,10 @@ void FOOTPRINTS_LISTBOX::SetFootprints( FOOTPRINT_LIST& aList, const wxString& a FOOTPRINT_FILTER filter( aList ); - if( aFilterType & FILTERING_BY_COMPONENT_KEYWORD ) + if( aFilterType & FILTERING_BY_COMPONENT_KEYWORD && aComponent ) filter.FilterByFootprintFilters( aComponent->GetFootprintFilters() ); - if( aFilterType & FILTERING_BY_PIN_COUNT ) + if( aFilterType & FILTERING_BY_PIN_COUNT && aComponent ) filter.FilterByPinCount( aComponent->GetNetCount() ); if( aFilterType & FILTERING_BY_LIBRARY )