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:
parent
a7270f8c1c
commit
b00413b7d6
|
@ -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 )
|
||||||
|
|
Loading…
Reference in New Issue