mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-23 11:12:44 +01:00
Merge pull request #165 from slingamn/get_fail
fix a wide-ranging assortment of crash bugs
This commit is contained in:
commit
a33e83de9e
@ -43,7 +43,10 @@ func (cm *ChannelManager) Get(name string) *Channel {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
cm.RLock()
|
cm.RLock()
|
||||||
defer cm.RUnlock()
|
defer cm.RUnlock()
|
||||||
return cm.chans[name].channel
|
entry := cm.chans[name]
|
||||||
|
if entry != nil {
|
||||||
|
return entry.channel
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user