macOS + FreeType: fix crash with non printable unicode
Task-number: QTBUG-84096 Pick-to: 5.15 Pick-to: 5.12 Change-Id: Ia60b7094ef9e82cf24f5a8b7995000ae65bb379a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
4edcea762d
commit
ebfd0b14aa
@ -406,7 +406,10 @@ QFontEngine *QCoreTextFontDatabaseEngineFactory<QFontEngineFT>::fontEngine(const
|
||||
faceId.filename = QString::fromNSString(url.path).toUtf8();
|
||||
return QFontEngineFT::create(fontDef, faceId);
|
||||
}
|
||||
Q_UNREACHABLE();
|
||||
// We end up here with a descriptor does not contain Qt font data or kCTFontURLAttribute.
|
||||
// Since the FT engine can't deal with a descriptor with just a NSFontNameAttribute,
|
||||
// we should return nullptr.
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user