VirtualBox

Changeset 17810 in vbox


Ignore:
Timestamp:
Mar 13, 2009 11:28:51 AM (16 years ago)
Author:
vboxsync
Message:

Main: fix IVirtualBox::GetNextExtraDataKey to accept empty strings as NULL values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r17737 r17810  
    14011401    HRESULT rc = S_OK;
    14021402
     1403    Bstr bstrInKey(aKey);
     1404
    14031405    /* serialize file access (prevent writes) */
    14041406    AutoReadLock alock (this);
     
    14311433
    14321434                    /* if we're supposed to return the first one */
    1433                     if (aKey == NULL)
     1435                    if (bstrInKey.isEmpty())
    14341436                    {
    14351437                        key.cloneTo (aNextKey);
     
    14431445
    14441446                    /* did we find the key we're looking for? */
    1445                     if (key == aKey)
     1447                    if (key == bstrInKey)
    14461448                    {
    14471449                        ++ it;
     
    14701472         * through to return NULLs and S_OK. */
    14711473
    1472         if (aKey != NULL)
     1474        if (!bstrInKey.isEmpty())
    14731475            return setError (VBOX_E_OBJECT_NOT_FOUND,
    1474                 tr ("Could not find the extra data key '%ls'"), aKey);
     1476                tr("Could not find the extra data key '%ls'"), bstrInKey.raw());
    14751477    }
    14761478    catch (...)
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