VirtualBox

Changeset 25997 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Jan 25, 2010 1:00:02 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56875
Message:

Fixed assumption that GetSnapshot by name would fail; previous broken code always returned the first snapshot in such cases.

File:
1 edited

Legend:

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

    r25936 r25997  
    34413441
    34423442    Guid uuid(aId);
     3443    if (    aId
     3444        &&  uuid.isEmpty())
     3445    {
     3446        RTUUID uuidTemp;
     3447        /* Either it's a null UUID or the conversion failed. (null uuid has a special meaning in findSnapshot) */
     3448        if (RT_FAILURE(RTUuidFromUtf16(&uuidTemp, aId)))
     3449            return setError(E_FAIL,
     3450                            tr("Could not find a snapshot with UUID {%ls}"),
     3451                            aId);
     3452    }
     3453
    34433454    ComObjPtr<Snapshot> snapshot;
    34443455
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