VirtualBox

Changeset 29926 in vbox for trunk/src


Ignore:
Timestamp:
May 31, 2010 6:37:31 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt: 4995: Crash if modal VM dialog is open during VM termination should be fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r29824 r29926  
    102102UIMachineWindow::~UIMachineWindow()
    103103{
     104    /* Close any opened modal & popup widgets: */
     105    while (QWidget *pWidget = QApplication::activeModalWidget() ? QApplication::activeModalWidget() :
     106                              QApplication::activePopupWidget() ? QApplication::activePopupWidget() : 0)
     107    {
     108        /* Set modal/popup window's parent to null early,
     109         * because deleteLater() is synchronous
     110         * and will be called later than this destructor: */
     111        pWidget->setParent(0);
     112        /* Close modal/popup window early to hide it
     113         * because deleteLater() is synchronous
     114         * and will be called later than this destructor: */
     115        pWidget->close();
     116        /* Delete modal/popup window synchronously (safe): */
     117        pWidget->deleteLater();
     118    }
    104119}
    105120
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