summaryrefslogtreecommitdiff
path: root/sysdata_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'sysdata_windows.go')
-rw-r--r--sysdata_windows.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdata_windows.go b/sysdata_windows.go
index 52e2806..7a5abae 100644
--- a/sysdata_windows.go
+++ b/sysdata_windows.go
@@ -385,6 +385,9 @@ func (s *sysData) selectedIndices() []int {
if r.ret == uintptr(_LB_ERR) {
panic("UI library internal error: LB_ERR from LB_GETSELCOUNT in what we know is a multi-selection listbox")
}
+ if r.ret == 0 { // nothing selected
+ return nil
+ }
indices := make([]int, r.ret)
uitask <- &uimsg{
call: _sendMessage,