VirtualBox

Ignore:
Timestamp:
Mar 13, 2023 4:59:44 PM (21 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10322: Runtime UI: More sanity check for UIIconPool; This is forgotten file for r156275.

File:
1 edited

Legend:

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

    r98940 r98944  
    281281void UISession::acquireMachinePixmap(const QSize &size, QPixmap &pixmap)
    282282{
    283     QPixmap machinePixmap = generalIconPool().userMachinePixmap(machine(), size);
     283    QPixmap machinePixmap;
     284    if (machine().isNotNull())
     285        machinePixmap = generalIconPool().userMachinePixmap(machine(), size);
    284286    if (machinePixmap.isNull())
    285287        machinePixmap = generalIconPool().guestOSTypePixmap(osTypeId(), size);
     
    290292void UISession::acquireUserMachineIcon(QIcon &icon)
    291293{
    292     QIcon machineIcon = generalIconPool().userMachineIcon(machine());
     294    QIcon machineIcon;
     295    if (machine().isNotNull())
     296        machineIcon = generalIconPool().userMachineIcon(machine());
    293297    if (machineIcon.isNull())
    294298        machineIcon = generalIconPool().guestOSTypeIcon(osTypeId());
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