VirtualBox

Changeset 31571 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 11, 2010 1:53:21 PM (14 years ago)
Author:
vboxsync
Message:

Main: protect Medium::setIDs depending on medium state

File:
1 edited

Legend:

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

    r31570 r31571  
    140140    bool autoReset : 1;
    141141
    142     /** the following members are invalid after changing UUID on open */
    143142    const Guid uuidImage;
    144143    const Guid uuidParentImage;
     
    645644}
    646645
    647 
    648646////////////////////////////////////////////////////////////////////////////////
    649647//
     
    16511649
    16521650    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     1651
     1652    switch (m->state)
     1653    {
     1654        case MediumState_Created:
     1655            break;
     1656        default:
     1657            return setStateError();
     1658    }
    16531659
    16541660    Guid imageId, parentId;
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