Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Commit 8151dd1

Browse files
authored
Merge pull request #36 from GDATASoftwareAG/fix-deref-empty-nic
fix deref empty nic
2 parents 9f2af9e + f37c86a commit 8151dd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/controller/ionoscloudmachine_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ func (r *IONOSCloudMachineReconciler) reconcileDeleteLoadBalancerForwardingRule(
204204
lbSpec := ctx.IONOSCloudCluster.Spec.LoadBalancer
205205
nic := ctx.IONOSCloudMachine.NicByLan(lbSpec.TargetLanRef.Name)
206206

207-
if nic == nil && nic.PrimaryIP != nil {
207+
if nic == nil || nic.PrimaryIP == nil {
208208
return nil
209209
}
210210

0 commit comments

Comments
 (0)