VirtualBox

Changeset 22298 in vbox for trunk


Ignore:
Timestamp:
Aug 17, 2009 2:41:04 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
51169
Message:

Main: fix locking assertion when discarding snapshots with state when VM has no state

File:
1 edited

Legend:

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

    r22294 r22298  
    80828082
    80838083    /* saveSettings() needs mParent lock */
    8084 //     AutoMultiWriteLock2 alock (mParent, this);
     8084    AutoMultiWriteLock2 alock(mParent, this);
    80858085
    80868086    ComAssertRet (!Global::IsOnlineOrTransient (mData->mMachineState), E_FAIL);
     
    81098109        if (isModified())
    81108110        {
    8111             snapshotLock.unlock();
    8112             treeLock.unlock();
    8113 
    8114             AutoWriteLock vboxLock(mParent);
    81158111            rc = saveSettings();
    81168112            CheckComRCReturnRC (rc);
    8117             vboxLock.unlock();
    8118 
    8119             treeLock.lock();
    8120             snapshotLock.lock();
    81218113        }
    81228114    }
     
    81468138
    81478139    /* set the proper machine state (note: after creating a Task instance) */
    8148     setMachineState (MachineState_Discarding);
     8140    setMachineState(MachineState_Discarding);
    81498141
    81508142    /* return the progress to the caller */
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