Hi, This very small patch checks that a footprint is selected before running the action when clicking on the delete button of the footprint filter window (symbol editing). The check is already done on every other actions of the window.
Damien
From 46bf6df7f7ae81c58a78afa2f879d515bb14371a Mon Sep 17 00:00:00 2001 From: Damien Espitallier <[email protected]> Date: Tue, 5 Jun 2018 23:33:49 +0200 Subject: [PATCH] Fix crash when delete button of footprint filter is clicked and no footprint is selected MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.17.1" This is a multi-part message in MIME format. --------------2.17.1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- eeschema/dialogs/dialog_edit_component_in_lib.cpp | 5 +++++ 1 file changed, 5 insertions(+) --------------2.17.1 Content-Type: text/x-patch; name="0001-Fix-crash-when-delete-button-of-footprint-filter-is-.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0001-Fix-crash-when-delete-button-of-footprint-filter-is-.patch" diff --git a/eeschema/dialogs/dialog_edit_component_in_lib.cpp b/eeschema/dialogs/dialog_edit_component_in_lib.cpp index 7392da993..bc154d099 100644 --- a/eeschema/dialogs/dialog_edit_component_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_lib.cpp @@ -555,6 +555,11 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteOneFootprintFilter( wxCommandEvent& LIB_PART* component = m_Parent->GetCurPart(); int ii = m_FootprintFilterListBox->GetSelection(); + if( ii == wxNOT_FOUND ) + { + return; + } + m_FootprintFilterListBox->Delete( ii ); if( !component || ( m_FootprintFilterListBox->GetCount() == 0 ) ) --------------2.17.1--
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

