Browse Source

Check if api.Result is nil before reading it in populateChat()

pull/55/head
Gregory Rudolph 4 years ago
parent
commit
67fc7c6e5d
  1. 2
      main.go

2
main.go

@ -376,7 +376,7 @@ func populateChat() { @@ -376,7 +376,7 @@ func populateChat() {
chat := k.NewChat(channel)
maxX, _ := g.Size()
api, err := chat.Read(maxX / 2)
if err != nil {
if err != nil || api.Result == nil {
for _, testChan := range channels {
if channel.Name == testChan.Name {
channel = testChan

Loading…
Cancel
Save