3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 18:52:41 +01:00

fix a wide-ranging assortment of crash bugs

This commit is contained in:
Shivaram Lingamneni 2017-11-13 02:42:20 -05:00
parent ff50a25b65
commit ca8a0b7091

View File

@ -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
}