Skip to content

Commit

Permalink
fix deref empty nic
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Jansen <[email protected]>
  • Loading branch information
farodin91 committed Nov 13, 2023
1 parent 9f2af9e commit de37ef6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/controller/ionoscloudmachine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func (r *IONOSCloudMachineReconciler) reconcileDeleteLoadBalancerForwardingRule(
lbSpec := ctx.IONOSCloudCluster.Spec.LoadBalancer
nic := ctx.IONOSCloudMachine.NicByLan(lbSpec.TargetLanRef.Name)

if nic == nil && nic.PrimaryIP != nil {
if nic == nil || nic.PrimaryIP != nil {
return nil
}

Expand Down

0 comments on commit de37ef6

Please sign in to comment.