Windows QPA: Potential crash fix for Wine
Add a check for theme instance. Pick-to: 5.15 Fixes: QTBUG-85734 Change-Id: I10aced73379cd5e0b49d5cee08ceead060397a54 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
37649b0942
commit
beb3916858
@ -569,8 +569,10 @@ bool QWindowsScreenManager::handleScreenChanges()
|
||||
removeScreen(i);
|
||||
} // for existing screens
|
||||
} // not lock screen
|
||||
if (primaryScreenChanged)
|
||||
QWindowsTheme::instance()->refreshFonts();
|
||||
if (primaryScreenChanged) {
|
||||
if (auto theme = QWindowsTheme::instance()) // QTBUG-85734/Wine
|
||||
theme->refreshFonts();
|
||||
}
|
||||
QHighDpiScaling::updateHighDpiScaling();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user