VirtualBox

Changeset 82007 in vbox


Ignore:
Timestamp:
Nov 19, 2019 7:46:36 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
134809
Message:

Main/GraphicsAdapter: fix lock order issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/GraphicsAdapterImpl.cpp

    r81971 r82007  
    248248HRESULT GraphicsAdapter::setAccelerate3DEnabled(BOOL aAccelerate3DEnabled)
    249249{
    250     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    251 
    252250    /* the machine needs to be mutable */
    253251    AutoMutableStateDependency adep(mParent);
    254252    if (FAILED(adep.rc())) return adep.rc();
     253
     254    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    255255
    256256    /** @todo check validity! */
     
    280280HRESULT GraphicsAdapter::setAccelerate2DVideoEnabled(BOOL aAccelerate2DVideoEnabled)
    281281{
    282     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    283 
    284282    /* the machine needs to be mutable */
    285283    AutoMutableStateDependency adep(mParent);
    286284    if (FAILED(adep.rc())) return adep.rc();
     285
     286    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    287287
    288288    /** @todo check validity! */
     
    312312                        aMonitorCount, 1, SchemaDefs::MaxGuestMonitors);
    313313
    314     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    315 
    316314    /* the machine needs to be mutable */
    317315    AutoMutableStateDependency adep(mParent);
    318316    if (FAILED(adep.rc())) return adep.rc();
     317
     318    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    319319
    320320    mParent->i_setModified(Machine::IsModified_GraphicsAdapter);
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