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

Fixes sentry KICAD-6KE


(cherry picked from commit b8bbbcf410)
This commit is contained in:
Marek Roszko 2024-01-24 20:15:23 -05:00 committed by Mark Roszko
parent c579e11db4
commit f45e3ca339
1 changed files with 1 additions and 1 deletions

View File

@ -1252,7 +1252,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 );