VirtualBox

Changeset 51079 in vbox


Ignore:
Timestamp:
Apr 15, 2014 3:04:26 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: 7353: UIRuntimeMiniToolBar: Prevent animation crash using manual object-destruction order.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp

    r50816 r51079  
    315315    if (m_pHoverLeaveTimer->isActive())
    316316        m_pHoverLeaveTimer->stop();
     317
     318    /* Destroy animation before mdi-toolbar: */
     319    delete m_pAnimation;
     320    m_pAnimation = 0;
     321
     322    /* Destroy mdi-toolbar after animation: */
     323    delete m_pEmbeddedToolbar;
     324    m_pEmbeddedToolbar = 0;
    317325}
    318326
     
    384392void UIRuntimeMiniToolBar::setToolbarPosition(QPoint point)
    385393{
    386     /* Make sure toolbar exists: */
    387     if (!m_pEmbeddedToolbar)
    388         return;
    389 
    390394    /* Update position: */
     395    AssertPtrReturnVoid(m_pEmbeddedToolbar);
    391396    m_pEmbeddedToolbar->move(point);
    392397
     
    402407QPoint UIRuntimeMiniToolBar::toolbarPosition() const
    403408{
    404     /* Make sure toolbar exists: */
    405     if (!m_pEmbeddedToolbar)
    406         return QPoint();
    407 
    408409    /* Return position: */
     410    AssertPtrReturn(m_pEmbeddedToolbar, QPoint());
    409411    return m_pEmbeddedToolbar->pos();
    410412}
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