Fix assert in SYMBOL_VIEWER_FRAME::onSelectNextSymbol due to bad current selection check

Fixes sentry KICAD-6KE
This commit is contained in:
Marek Roszko 2024-01-24 20:15:23 -05:00
parent 8f57a9bcf0
commit b8bbbcf410
1 changed files with 1 additions and 1 deletions

View File

@ -1055,7 +1055,7 @@ void SYMBOL_VIEWER_FRAME::onSelectNextSymbol( wxCommandEvent& aEvent )
int ii = m_symbolList->GetSelection();
// Select the next symbol or stop at the end of the list.
if( ii != wxNOT_FOUND || ii != (int) m_symbolList->GetCount() - 1 )
if( ii != wxNOT_FOUND && ii < (int)(m_symbolList->GetCount() - 1) )
ii += 1;
m_symbolList->SetSelection( ii );