mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-30 06:28:31 +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) {
|
||||
ChatSubscriptionLock.RLock()
|
||||
list := ChatSubscriptionInfo[channelName]
|
||||
list.Lock()
|
||||
RemoveFromSliceC(&list.Members, client.MessageChannel)
|
||||
list.Unlock()
|
||||
if list != nil {
|
||||
list.Lock()
|
||||
RemoveFromSliceC(&list.Members, client.MessageChannel)
|
||||
list.Unlock()
|
||||
}
|
||||
ChatSubscriptionLock.RUnlock()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue