VirtualBox

Ignore:
Timestamp:
May 17, 2021 3:25:53 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: Guarding action pool pointer with QPointer to avoid crashes during vm close.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r89036 r89104  
    10491049    if (!panel)
    10501050        return;
     1051    if (!m_pActionPool)
     1052        return;
    10511053    if (panel->isVisible())
    10521054        panel->setVisible(false);
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h

    r89011 r89104  
    2525#include <QKeySequence>
    2626#include <QPair>
     27#include <QPointer>
    2728#include <QWidget>
    2829
     
    207208    /** Holds the widget's embedding type. */
    208209    const EmbedTo m_enmEmbedding;
    209     /** Hold sthe action-pool reference. */
    210     UIActionPool *m_pActionPool;
     210    /** Holds the action-pool reference. Wrapped around with QPointer  to avoid use-after-delete case during vm window close.*/
     211    QPointer<UIActionPool> m_pActionPool;
    211212    /** Holds whether we should create/show toolbar. */
    212213    const bool    m_fShowToolbar;
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