File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,11 @@ namespace QWK {
4747
4848 bool BorderItem::shouldEnableEmulatedPainter () const {
4949# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
50- auto api = window ()->rendererInterface ()->graphicsApi ();
50+ const QQuickWindow* win = window ();
51+ if (!win) {
52+ return true ;
53+ }
54+ auto api = win->rendererInterface ()->graphicsApi ();
5155 switch (api) {
5256 case QSGRendererInterface::OpenGL:
5357 // FIXME: experimental, try to find the exact fixed version.
@@ -97,7 +101,11 @@ namespace QWK {
97101 BorderItem::~BorderItem () = default ;
98102
99103 void BorderItem::updateGeometry () {
100- setHeight (borderThickness () / window ()->devicePixelRatio ());
104+ const QQuickWindow* win = window ();
105+ if (!win) {
106+ return ;
107+ }
108+ setHeight (borderThickness () / win->effectiveDevicePixelRatio ());
101109 setVisible (isNormalWindow ());
102110 }
103111
You can’t perform that action at this time.
0 commit comments