Fixed a crash on moving down the last field in the Symbol Properties dialog

This commit is contained in:
Maciej Suminski 2018-11-13 14:14:08 +01:00
parent 44424dcbb3
commit 298a033b9d
1 changed files with 1 additions and 1 deletions

View File

@ -645,7 +645,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnMoveDown( wxCommandEvent& event )
int i = m_grid->GetGridCursorRow();
if( i >= MANDATORY_FIELDS )
if( i >= MANDATORY_FIELDS && i < m_grid->GetNumberRows() - 1 )
{
SCH_FIELD tmp = m_fields->at( (unsigned) i );
m_fields->erase( m_fields->begin() + i, m_fields->begin() + i + 1 );