From 604c2a683f1357fc65bad372b5d25a90099f827f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 3 Oct 2013 19:59:30 +0900 Subject: exit with the error code when FcNameParse() failed --- fc-pattern/fc-pattern.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fc-pattern') diff --git a/fc-pattern/fc-pattern.c b/fc-pattern/fc-pattern.c index 3f066c1e..d2279cb3 100644 --- a/fc-pattern/fc-pattern.c +++ b/fc-pattern/fc-pattern.c @@ -137,6 +137,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) -- cgit v1.2.3