VirtualBox

Changeset 50084 in vbox


Ignore:
Timestamp:
Jan 16, 2014 9:33:20 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
91605
Message:

Main/ConsoleImp: prevent VERR_CFGM_INVALID_NODE_PATH errors by an early check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r49983 r50084  
    11741174            hrc = bwGroups[i]->COMGETTER(Type)(&enmType);                                   H();
    11751175            hrc = bwGroups[i]->COMGETTER(MaxBytesPerSec)(&cMaxBytesPerSec);                 H();
     1176
     1177            if (strName.isEmpty())
     1178                return VMR3SetError(pUVM, VERR_CFGM_NO_NODE, RT_SRC_POS,
     1179                                    N_("No bandwidth group name specified"));
    11761180
    11771181            if (enmType == BandwidthGroupType_Disk)
     
    43504354                        continue;
    43514355
     4356                    if (strName.isEmpty())
     4357                        VMSetError(VMR3GetVM(mpUVM), VERR_CFGM_NO_NODE, RT_SRC_POS,
     4358                                   N_("NAT redirection rule without a name"));
     4359
    43524360                    InsertConfigNode(pCfg, strName.c_str(), &pPF);
    43534361                    InsertConfigString(pPF, "Protocol", strProto);
Note: See TracChangeset for help on using the changeset viewer.

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