Skip to content

Commit

Permalink
Merge pull request #3261 from mayankbh/topic/bmayank/prepare-guest-op…
Browse files Browse the repository at this point in the history
…-fix

vcsim: Handle prepare guest operations when svm is nil
  • Loading branch information
mayankbh authored Oct 17, 2023
2 parents 846db5a + db0ba92 commit 244e3ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simulator/container_virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (svm *simVM) syncNetworkConfigToVMGuestProperties() error {
}

func (svm *simVM) prepareGuestOperation(auth types.BaseGuestAuthentication) types.BaseMethodFault {
if svm != nil && (svm.c == nil || svm.c.id == "") {
if svm == nil || svm.c == nil || svm.c.id == "" {
return new(types.GuestOperationsUnavailable)
}

Expand Down

0 comments on commit 244e3ac

Please sign in to comment.