diff options
| -rw-r--r-- | sysdata_windows.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdata_windows.go b/sysdata_windows.go index 7458f45..42c8f94 100644 --- a/sysdata_windows.go +++ b/sysdata_windows.go @@ -363,7 +363,11 @@ func (s *sysData) selectedIndex() int { func (s *sysData) selectedIndices() []int { if !s.alternate { // single-selection list box; use single-selection method - return []int{s.selectedIndex()} + index := s.selectedIndex() + if index == -1 { + return nil + } + return []int{index} } ret := make(chan uiret) |
