VirtualBox

Changeset 90387 in vbox


Ignore:
Timestamp:
Jul 29, 2021 7:56:07 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10067: UINotificationObject: A bit of protection for task member which can be not created yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObject.cpp

    r90290 r90387  
    5858bool UINotificationProgress::isCancelable() const
    5959{
    60     return m_pTask->isCancelable();
     60    return m_pTask ? m_pTask->isCancelable() : false;
    6161}
    6262
    6363QString UINotificationProgress::error() const
    6464{
    65     return m_pTask->errorMessage();
     65    return m_pTask ? m_pTask->errorMessage() : QString();
    6666}
    6767
     
    8787{
    8888    /* Cancel task: */
    89     m_pTask->cancel();
     89    if (m_pTask)
     90        m_pTask->cancel();
    9091    /* Call to base-class: */
    9192    UINotificationObject::close();
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