From 15f601104e65a890a684953fb7a7f6bb2cda8d7b Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Fri, 19 Apr 2024 20:15:33 +0800 Subject: [PATCH] fix: nil pointer deref --- internal/sync/roles.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/sync/roles.go b/internal/sync/roles.go index a1162fb..36957db 100644 --- a/internal/sync/roles.go +++ b/internal/sync/roles.go @@ -215,7 +215,9 @@ func generateRoles( continue } } - roles[name] = *role + if role != nil { + roles[name] = *role + } } return roles }