Don't crash when lib table has no rows.

Fixes https://gitlab.com/kicad/code/kicad/issues/6812
This commit is contained in:
Jeff Young 2020-12-23 22:10:09 +00:00
parent ffe7d2ea49
commit f722ba690f
1 changed files with 1 additions and 1 deletions

View File

@ -674,7 +674,7 @@ void PANEL_SYM_LIB_TABLE::onConvertLegacyLibraries( wxCommandEvent& event )
wxArrayInt selectedRows = m_cur_grid->GetSelectedRows();
if( selectedRows.empty() )
if( selectedRows.empty() && m_cur_grid->GetGridCursorRow() >= 0 )
selectedRows.push_back( m_cur_grid->GetGridCursorRow() );
wxArrayInt legacyRows;