if ( oper != None )
{
wxArrayInt selections;
- int count;
+ int count = 0;
if ( HasMultipleSelection() )
{
count = GetSelections(selections);
}
else
{
- count = 1;
- selections.Add(GetSelection());
+ int sel = GetSelection();
+ if (sel != -1)
+ {
+ count = 1;
+ selections.Add(sel);
+ }
}
for ( int i = 0; i < count; i++ )