From a80365ef380998d74172437266e8b9f51c74061f Mon Sep 17 00:00:00 2001 From: citrons Date: Thu, 5 Jun 2025 19:51:13 -0500 Subject: fix empty channel list crash --- client/channel_list.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'client') 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 { -- cgit v1.2.3