Check for NULL familyName in SkFontMgr_fontconfig.
If the familyName is NULL, don't bother spending time trying to add it to the FcPattern. Review URL: https://codereview.chromium.org/1115073002
This commit is contained in:
parent
9954bc38c4
commit
6837b38a62
@ -771,10 +771,12 @@ protected:
|
||||
FCLocker lock;
|
||||
|
||||
SkAutoFcPattern pattern;
|
||||
FcValue familyNameValue;
|
||||
familyNameValue.type = FcTypeString;
|
||||
familyNameValue.u.s = reinterpret_cast<const FcChar8*>(familyName);
|
||||
FcPatternAddWeak(pattern, FC_FAMILY, familyNameValue, FcFalse);
|
||||
if (familyName) {
|
||||
FcValue familyNameValue;
|
||||
familyNameValue.type = FcTypeString;
|
||||
familyNameValue.u.s = reinterpret_cast<const FcChar8*>(familyName);
|
||||
FcPatternAddWeak(pattern, FC_FAMILY, familyNameValue, FcFalse);
|
||||
}
|
||||
fcpattern_from_skfontstyle(style, pattern);
|
||||
|
||||
SkAutoFcCharSet charSet;
|
||||
|
Loading…
Reference in New Issue
Block a user