[fcmatch] Fix crash when no fonts are available.
This commit is contained in:
parent
c08216c6f4
commit
b8860e2faf
|
@ -550,7 +550,10 @@ FcFontSetMatch (FcConfig *config,
|
|||
return 0;
|
||||
}
|
||||
best = FcFontSetMatchInternal (config, sets, nsets, p, result);
|
||||
if (best)
|
||||
return FcFontRenderPrepare (config, p, best);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
FcPattern *
|
||||
|
@ -575,7 +578,10 @@ FcFontMatch (FcConfig *config,
|
|||
sets[nsets++] = config->fonts[FcSetApplication];
|
||||
|
||||
best = FcFontSetMatchInternal (config, sets, nsets, p, result);
|
||||
if (best)
|
||||
return FcFontRenderPrepare (config, p, best);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
typedef struct _FcSortNode {
|
||||
|
|
Loading…
Reference in New Issue