Commit 184bd300 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Protect against nil dereference in group.Get.

parent f683675a
...@@ -496,7 +496,9 @@ func GetSubGroups(parent string) []SubGroup { ...@@ -496,7 +496,9 @@ func GetSubGroups(parent string) []SubGroup {
func Get(name string) *Group { func Get(name string) *Group {
groups.mu.Lock() groups.mu.Lock()
defer groups.mu.Unlock() defer groups.mu.Unlock()
if groups.groups == nil {
return nil
}
return groups.groups[name] return groups.groups[name]
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment