Skip to content
This repository was archived by the owner on Dec 16, 2021. It is now read-only.

Commit 83b8533

Browse files
committed
Fix crash when receiving a message if no guild is selected
1 parent 2a0a45a commit 83b8533

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/window.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,8 +1304,8 @@ func (window *Window) startMessageHandlerRoutines(input, edit, delete chan *disc
13041304
}
13051305
window.chatView.Unlock()
13061306

1307-
if channel.Type == discordgo.ChannelTypeGuildText && window.selectedGuild == nil ||
1308-
window.selectedGuild.ID != channel.GuildID {
1307+
if channel.Type == discordgo.ChannelTypeGuildText && (window.selectedGuild == nil ||
1308+
window.selectedGuild.ID != channel.GuildID) {
13091309
for _, guildNode := range window.guildList.GetRoot().GetChildren() {
13101310
if guildNode.GetReference() == channel.GuildID {
13111311
window.app.QueueUpdateDraw(func() {

0 commit comments

Comments
 (0)