1
0
Fork 0
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:
Kane York 2015-10-29 10:29:16 -07:00
parent 37833043bd
commit a14038b215

View file

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