Skip to content

Commit

Permalink
fix inuse.go
Browse files Browse the repository at this point in the history
Signed-off-by: dmitry.lopatin <[email protected]>
  • Loading branch information
LopatinDmitr committed Oct 21, 2024
1 parent 896624e commit f209bec
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ func (h InUseHandler) Handle(ctx context.Context, vd *virtv2.VirtualDisk) (recon
if err != nil {
return reconcile.Result{}, fmt.Errorf("error getting kubevirt virtual machine: %w", err)
}

if kvvm.Status.StateChangeRequests != nil {
inUseInRunningVirtualMachine = true
if kvvm != nil {
if kvvm.Status.StateChangeRequests != nil {
inUseInRunningVirtualMachine = true
}
}

}
}
}
Expand Down

0 comments on commit f209bec

Please sign in to comment.