diff options
| author | citrons <citrons@mondecitronne.com> | 2025-06-05 19:51:13 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2025-06-07 16:02:18 -0500 |
| commit | a80365ef380998d74172437266e8b9f51c74061f (patch) | |
| tree | 6400c55fd335c8e2704d31143e353a4eb67a4013 | |
| parent | 81d7512479f01e5b22a26967642dd7951369bd65 (diff) | |
fix empty channel list crash
| -rw-r--r-- | client/channel_list.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/channel_list.go b/client/channel_list.go index 5903792..10b07f1 100644 --- a/client/channel_list.go +++ b/client/channel_list.go @@ -52,6 +52,10 @@ func (cl *channelList) remove(location channelLocation) { } func (cl *channelList) traverse(direction int) { + if len(*cl) == 0 { + return + } + var i int for i = 0; i < len(*cl); i++ { if (*cl)[i].location == globalApp.currentWindow { |
