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
This commit is contained in:
jean-pierre charras 2019-03-30 09:29:38 +01:00
parent e1f64d6283
commit 77993ced7e
1 changed files with 3 additions and 0 deletions

View File

@ -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 )