VirtualBox

Changeset 90734 in vbox


Ignore:
Timestamp:
Aug 18, 2021 6:05:46 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9996: UINativeWizard: Crash protection for r144622.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/UINativeWizard.cpp

    r90730 r90734  
    737737    QPixmap pixmapNew = QPixmap::fromImage(imageNew);
    738738    /* For HiDPI support parent-widget's device pixel ratio is to be taken into account: */
    739     const double dRatio = parentWidget()->windowHandle()->devicePixelRatio();
     739    double dRatio = 1.0;
     740    if (   parentWidget()
     741        && parentWidget()->window()
     742        && parentWidget()->window()->windowHandle())
     743        dRatio = parentWidget()->window()->windowHandle()->devicePixelRatio();
    740744    pixmapNew.setDevicePixelRatio(dRatio);
    741745    /* Assign watermark finally: */
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