From b00413b7d6b719c249edbd291ec264ff2e2e3230 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 30 Mar 2019 09:29:38 +0100 Subject: [PATCH] Symbol editor, DIALOG_LIB_EDIT_PIN_TABLE: fix crash when trying to delete a pin when the table is empty. Fixes: lp:1822406 https://bugs.launchpad.net/kicad/+bug/1822406 --- eeschema/dialogs/dialog_lib_edit_pin_table.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp index add21ca414..2384e55c93 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp +++ b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp @@ -547,6 +547,9 @@ void DIALOG_LIB_EDIT_PIN_TABLE::OnDeleteRow( wxCommandEvent& event ) if( !m_grid->CommitPendingChanges() ) return; + if( m_pins.size() == 0 ) // empty table + return; + int curRow = m_grid->GetGridCursorRow(); if( curRow < 0 )