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 a7270f8c1c
commit b00413b7d6
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() ) if( !m_grid->CommitPendingChanges() )
return; return;
if( m_pins.size() == 0 ) // empty table
return;
int curRow = m_grid->GetGridCursorRow(); int curRow = m_grid->GetGridCursorRow();
if( curRow < 0 ) if( curRow < 0 )