Don't crash when lib table has no rows.
Fixes https://gitlab.com/kicad/code/kicad/issues/6812
This commit is contained in:
parent
ffe7d2ea49
commit
f722ba690f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue