Skip to content

Commit 700fb2e

Browse files
committed
fix: nil pointer
1 parent 8663917 commit 700fb2e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

controllers/set/reconcile.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ func (c *controller) createFirewall(r *controllers.Ctx[*v2.FirewallSet]) (*v2.Fi
159159

160160
if r.Target.Annotations != nil {
161161
if val, ok := r.Target.Annotations[v2.FirewallNoControllerConnectionAnnotation]; ok {
162+
if meta.Annotations == nil {
163+
meta.Annotations = map[string]string{}
164+
}
162165
meta.Annotations[v2.FirewallNoControllerConnectionAnnotation] = val
163166
}
164167
}

0 commit comments

Comments
 (0)