Treat QTestFontEngine properly
Do not try to fill fontDef when it's a test font engine, otherwise it will cause a crash because desc.family is 0. Change-Id: I008b784bae3e60a25c33c285d944442a3616a9a2 Reviewed-on: http://codereview.qt-project.org/5103 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
This commit is contained in:
parent
e63b6f113c
commit
1aaf08691d
@ -260,7 +260,7 @@ QFontDatabase::findFont(int script, const QFontPrivate *fp,
|
|||||||
FM_DEBUG(" NO MATCH FOUND\n");
|
FM_DEBUG(" NO MATCH FOUND\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (engine) {
|
if (engine && engine->type() != QFontEngine::TestFontEngine) {
|
||||||
initFontDef(desc, request, &engine->fontDef);
|
initFontDef(desc, request, &engine->fontDef);
|
||||||
|
|
||||||
if (fp) {
|
if (fp) {
|
||||||
|
Loading…
Reference in New Issue
Block a user