1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-22 23:35:46 +01:00

Protect against nil dereference in group.Get.

This commit is contained in:
Juliusz Chroboczek 2021-09-11 15:14:13 +02:00
parent f683675ab4
commit 184bd30077

View file

@ -496,7 +496,9 @@ func GetSubGroups(parent string) []SubGroup {
func Get(name string) *Group {
groups.mu.Lock()
defer groups.mu.Unlock()
if groups.groups == nil {
return nil
}
return groups.groups[name]
}