VirtualBox

Changeset 48907 in vbox


Ignore:
Timestamp:
Oct 5, 2013 10:59:26 PM (11 years ago)
Author:
vboxsync
Message:

GUI: The media-boffin must be destroyed _AFTER_ the guys using it, otherways you have races.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r48906 r48907  
    43684368    UIExtraDataEventHandler::destroy();
    43694369
     4370    /* Destroy the GUI root windows _BEFORE_ the media-mess, because there is
     4371       code in the GUI that's using the media code an will be racing us! */
     4372    if (mSelectorWnd)
     4373    {
     4374        delete mSelectorWnd;
     4375        mSelectorWnd = NULL;
     4376    }
     4377
     4378    if (m_pVirtualMachine)
     4379    {
     4380        delete m_pVirtualMachine;
     4381        m_pVirtualMachine = NULL;
     4382    }
     4383
    43704384    /* Cleanup medium-enumerator: */
    43714385    m_mediumEnumeratorDtorRwLock.lockForWrite();
     
    43744388    m_mediumEnumeratorDtorRwLock.unlock();
    43754389
    4376     if (mSelectorWnd)
    4377         delete mSelectorWnd;
    4378     if (m_pVirtualMachine)
    4379         delete m_pVirtualMachine;
    4380 
     4390    /* Destroy whatever this converter stuff is: */
    43814391    UIConverter::cleanup();
    43824392
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp

    r48906 r48907  
    11/* $Id$ */
    22/** @file
    3  *
    4  * VBox frontends: Qt GUI ("VirtualBox"):
    5  * UIGDetailsDetails class implementation
     3 * VBox Qt GUI - UIGDetailsDetails class implementation.
    64 */
    75
     
    6260UIGDetailsElementInterface::~UIGDetailsElementInterface()
    6361{
    64     /* VBoxGlobal must still be valid at this point, otherwise our thread might
    65        be doing really bad things to already deleted memory! */
    66     Assert(vboxGlobal().isValid());
    67     Assert(!vboxGlobal().isCleaningUp());
    68 
    6962    cleanupThread();
    7063}
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