VirtualBox

Changeset 76771 in vbox for trunk


Ignore:
Timestamp:
Jan 11, 2019 12:51:50 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8900: Selector UI: Machine tools: A bit of protection for r117325.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.cpp

    r76606 r76771  
    5656UIToolType UIToolPaneGlobal::currentTool() const
    5757{
    58     return m_pLayout->currentWidget()->property("ToolType").value<UIToolType>();
     58    return   m_pLayout && m_pLayout->currentWidget()
     59           ? m_pLayout->currentWidget()->property("ToolType").value<UIToolType>()
     60           : UIToolType_Invalid;
    5961}
    6062
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.cpp

    r76606 r76771  
    5959UIToolType UIToolPaneMachine::currentTool() const
    6060{
    61     return m_pLayout->currentWidget()->property("ToolType").value<UIToolType>();
     61    return   m_pLayout && m_pLayout->currentWidget()
     62           ? m_pLayout->currentWidget()->property("ToolType").value<UIToolType>()
     63           : UIToolType_Invalid;
    6264}
    6365
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