summaryrefslogtreecommitdiff
path: root/fc-match
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2013-10-03 19:59:30 +0900
committerAkira TAGOH <akira@tagoh.org>2013-10-03 19:59:30 +0900
commit604c2a683f1357fc65bad372b5d25a90099f827f (patch)
tree47c12d45eb87b603e65c233052290b5127b88a58 /fc-match
parent0203055520206028eecee5d261887cdc91500e15 (diff)
exit with the error code when FcNameParse() failed
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 260f404..f96c009 100644
--- a/fc-match/fc-match.c
+++ b/fc-match/fc-match.c
@@ -146,6 +146,11 @@ main (int argc, char **argv)
if (argv[i])
{
pat = FcNameParse ((FcChar8 *) argv[i]);
+ if (!pat)
+ {
+ fputs ("Unable to parse the pattern\n", stderr);
+ return 1;
+ }
while (argv[++i])
{
if (!os)