summaryrefslogtreecommitdiff
path: root/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp')
-rw-r--r--src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
index 232b7dd87..3df530498 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
@@ -1975,12 +1975,14 @@ int handleModifyVM(HandlerArg *a)
if (!fScsiLsiLogic)
{
CHECK_ERROR(machine, AddStorageController(Bstr("BusLogic"), StorageBus_SCSI, ctl.asOutParam()));
- CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_BusLogic));
+ if (SUCCEEDED(rc))
+ CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_BusLogic));
}
else /* LsiLogic is default */
{
CHECK_ERROR(machine, AddStorageController(Bstr("LsiLogic"), StorageBus_SCSI, ctl.asOutParam()));
- CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_LsiLogic));
+ if (SUCCEEDED(rc))
+ CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_LsiLogic));
}
}
else