Fix component chooser dialog crash if there are no FPs available

This commit is contained in:
Maciej Suminski 2017-03-31 17:15:09 +02:00
parent c3ff34e0df
commit 0a8a659ff7
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ wxPanel* DIALOG_CHOOSE_COMPONENT::ConstructRightPanel( wxWindow* aParent )
wxFULL_REPAINT_ON_RESIZE | wxSUNKEN_BORDER | wxTAB_TRAVERSAL );
m_sch_view_ctrl->SetLayoutDirection( wxLayout_LeftToRight );
if( m_allow_field_edits )
if( m_allow_field_edits && m_fp_list )
m_fp_sel_ctrl = new FOOTPRINT_SELECT_WIDGET( panel, m_fp_loader, m_fp_list, true );
else
m_fp_sel_ctrl = nullptr;