Skip to content

Commit

Permalink
add a nil check on config to HasTag to not panic if it was never set (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
luthermonson authored Feb 25, 2024
1 parent bbc658b commit e312865
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ func (v *VirtualMachine) VNCProxy(ctx context.Context) (vnc *VNC, err error) {
}

func (v *VirtualMachine) HasTag(value string) bool {
if v.VirtualMachineConfig == nil {
return false
}

if v.VirtualMachineConfig.Tags == "" {
return false
}
Expand Down

0 comments on commit e312865

Please sign in to comment.