diff --git a/irc/channelmanager.go b/irc/channelmanager.go index ddc25c71..468393c9 100644 --- a/irc/channelmanager.go +++ b/irc/channelmanager.go @@ -43,7 +43,10 @@ func (cm *ChannelManager) Get(name string) *Channel { if err == nil { cm.RLock() defer cm.RUnlock() - return cm.chans[name].channel + entry := cm.chans[name] + if entry != nil { + return entry.channel + } } return nil }