VirtualBox

Changeset 30403 in vbox


Ignore:
Timestamp:
Jun 23, 2010 6:42:17 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
63023
Message:

VBoxManage: Fix crash when changing the I/O cache option for a non existant controller

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp

    r30125 r30403  
    929929            CHECK_ERROR(machine, GetStorageControllerByName(Bstr(pszCtl), ctl.asOutParam()));
    930930
    931             if (!RTStrICmp(pszHostIOCache, "on"))
    932             {
    933                 CHECK_ERROR(ctl, COMSETTER(UseHostIOCache)(TRUE));
    934             }
    935             else if (!RTStrICmp(pszHostIOCache, "off"))
    936             {
    937                 CHECK_ERROR(ctl, COMSETTER(UseHostIOCache)(FALSE));
    938             }
    939             else
    940             {
    941                 errorArgument("Invalid --hostiocache argument '%s'", pszHostIOCache);
     931            if (SUCCEEDED(rc))
     932            {
     933                if (!RTStrICmp(pszHostIOCache, "on"))
     934                {
     935                    CHECK_ERROR(ctl, COMSETTER(UseHostIOCache)(TRUE));
     936                }
     937                else if (!RTStrICmp(pszHostIOCache, "off"))
     938                {
     939                    CHECK_ERROR(ctl, COMSETTER(UseHostIOCache)(FALSE));
     940                }
     941                else
     942                {
     943                    errorArgument("Invalid --hostiocache argument '%s'", pszHostIOCache);
     944                    rc = E_FAIL;
     945                }
     946            }
     947            else
     948            {
     949                errorArgument("Couldn't find the controller with the name: '%s'\n", pszCtl);
    942950                rc = E_FAIL;
    943951            }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette