mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-20 12:01:41 +00:00
LISTBOX_TRICKS::listBoxDeleteSelected(): fix crash when trying to remove 0 entries.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20320
This commit is contained in:
parent
6df9c90440
commit
dd604361d3
@ -99,6 +99,9 @@ wxArrayInt LISTBOX_TRICKS::listBoxDeleteSelected()
|
||||
wxArrayInt selections;
|
||||
m_listBox.GetSelections( selections );
|
||||
|
||||
if( selections.GetCount() == 0 ) // Nothing to remove
|
||||
return selections;
|
||||
|
||||
std::sort( selections.begin(), selections.end() );
|
||||
|
||||
for( int ii = selections.GetCount() - 1; ii >= 0; ii-- )
|
||||
|
Loading…
Reference in New Issue
Block a user