summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
index 3bd24fdaab0..2fa08d30ced 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
@@ -841,7 +841,7 @@ static bool addFontToDatabase(const QString &familyName, uchar charSet,
int type)
{
// the "@family" fonts are just the same as "family". Ignore them.
- if (familyName.at(0) == QLatin1Char('@') || familyName.startsWith(QStringLiteral("WST_")))
+ if (familyName.isEmpty() || familyName.at(0) == QLatin1Char('@') || familyName.startsWith(QStringLiteral("WST_")))
return false;
static const int SMOOTH_SCALABLE = 0xffff;
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
index c9160e4a75e..57a9077e5dd 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
@@ -130,7 +130,7 @@ static bool addFontToDatabase(const QString &familyName, uchar charSet,
typedef QPair<QString, QStringList> FontKey;
// the "@family" fonts are just the same as "family". Ignore them.
- if (familyName.at(0) == QLatin1Char('@') || familyName.startsWith(QStringLiteral("WST_")))
+ if (familyName.isEmpty() || familyName.at(0) == QLatin1Char('@') || familyName.startsWith(QStringLiteral("WST_")))
return false;
const int separatorPos = familyName.indexOf(QStringLiteral("::"));