зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1186875 - check if FcFontSort returns non-null. r=jtd
This commit is contained in:
Родитель
52ee71547c
Коммит
20e9dbbf1a
|
@ -1410,6 +1410,10 @@ gfxFcPlatformFontList::FindGenericFamily(const nsAString& aGeneric,
|
|||
nsAutoRef<FcFontSet> faces(FcFontSort(nullptr, genericPattern, FcFalse,
|
||||
nullptr, &result));
|
||||
|
||||
if (!faces) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// -- pick the first font for which a font family exists
|
||||
for (int i = 0; i < faces->nfont; i++) {
|
||||
FcPattern* font = faces->fonts[i];
|
||||
|
|
Загрузка…
Ссылка в новой задаче