From 184bd30077fb661297fcb32a6413ed83365c8b05 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sat, 11 Sep 2021 15:14:13 +0200 Subject: [PATCH] Protect against nil dereference in group.Get. --- group/group.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/group/group.go b/group/group.go index 11a5569..82e6c39 100644 --- a/group/group.go +++ b/group/group.go @@ -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] }