summaryrefslogtreecommitdiff
path: root/src/fcmatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fcmatch.c')
-rw-r--r--src/fcmatch.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/fcmatch.c b/src/fcmatch.c
index 556fffe..b86cbbc 100644
--- a/src/fcmatch.c
+++ b/src/fcmatch.c
@@ -550,7 +550,10 @@ FcFontSetMatch (FcConfig *config,
return 0;
}
best = FcFontSetMatchInternal (config, sets, nsets, p, result);
- return FcFontRenderPrepare (config, p, best);
+ 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);
- return FcFontRenderPrepare (config, p, best);
+ if (best)
+ return FcFontRenderPrepare (config, p, best);
+ else
+ return NULL;
}
typedef struct _FcSortNode {