summaryrefslogtreecommitdiff
path: root/fc-match
diff options
context:
space:
mode:
Diffstat (limited to 'fc-match')
-rw-r--r--fc-match/fc-match.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fc-match/fc-match.c b/fc-match/fc-match.c
index e64b4bc..095dd4e 100644
--- a/fc-match/fc-match.c
+++ b/fc-match/fc-match.c
@@ -175,6 +175,11 @@ main (int argc, char **argv)
int j;
font_patterns = FcFontSort (0, pat, all ? FcFalse : FcTrue, 0, &result);
+ if (!font_patterns || font_patterns->nfont == 0)
+ {
+ fputs("No fonts installed on the system\n", stderr);
+ return 1;
+ }
for (j = 0; j < font_patterns->nfont; j++)
{
FcPattern *font_pattern;