| Index: src/ports/SkFontMgr_fontconfig.cpp
|
| diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp
|
| index 58597d93952bcc07a630c1c9a8a85f1445df13bc..f03e5acaf1382d50fc6ababd4d682f7cabacd632 100644
|
| --- a/src/ports/SkFontMgr_fontconfig.cpp
|
| +++ b/src/ports/SkFontMgr_fontconfig.cpp
|
| @@ -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;
|
|
|