mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-31 06:58:30 +00:00
missing list != nil check
This commit is contained in:
parent
37833043bd
commit
a14038b215
1 changed files with 5 additions and 3 deletions
|
@ -144,9 +144,11 @@ func UnsubscribeAll(client *ClientInfo) {
|
||||||
func UnsubscribeSingleChat(client *ClientInfo, channelName string) {
|
func UnsubscribeSingleChat(client *ClientInfo, channelName string) {
|
||||||
ChatSubscriptionLock.RLock()
|
ChatSubscriptionLock.RLock()
|
||||||
list := ChatSubscriptionInfo[channelName]
|
list := ChatSubscriptionInfo[channelName]
|
||||||
list.Lock()
|
if list != nil {
|
||||||
RemoveFromSliceC(&list.Members, client.MessageChannel)
|
list.Lock()
|
||||||
list.Unlock()
|
RemoveFromSliceC(&list.Members, client.MessageChannel)
|
||||||
|
list.Unlock()
|
||||||
|
}
|
||||||
ChatSubscriptionLock.RUnlock()
|
ChatSubscriptionLock.RUnlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue