Fix QFontConfigDatabase crash
Take into account the possibility that the target platform plugin does not support platform services. Change-Id: I48e7fac2e1230a9a7d450414044d23ed26b334be Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
parent
b1de018e9a
commit
a2f59955ae
@ -648,8 +648,8 @@ QFontEngine *QFontconfigDatabase::fontEngine(const QFontDef &f, QChar::Script sc
|
||||
}
|
||||
|
||||
if (f.hintingPreference == QFont::PreferDefaultHinting) {
|
||||
QByteArray desktopEnvironment = QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment();
|
||||
if (desktopEnvironment == "GNOME" || desktopEnvironment == "UNITY") {
|
||||
const QPlatformServices *services = QGuiApplicationPrivate::platformIntegration()->services();
|
||||
if (services && (services->desktopEnvironment() == "GNOME" || services->desktopEnvironment() == "UNITY")) {
|
||||
void *hintStyleResource =
|
||||
QGuiApplication::platformNativeInterface()->nativeResourceForScreen("hintstyle",
|
||||
QGuiApplication::primaryScreen());
|
||||
|
Loading…
Reference in New Issue
Block a user