From: Akira TAGOH Date: Thu, 24 Jan 2013 10:48:48 +0000 (+0900) Subject: Warn if no nor elements in X-Git-Tag: 2.11.1~32 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Ffontconfig.git;a=commitdiff_plain;h=aa22e6e63933e8b31a032835b712b7ed596534cc Warn if no nor elements in This corrects an error message being reported at https://bugs.freedesktop.org/show_bug.cgi?id=71085 Bug 71085 - "out of memory" errors on empty match element in fonts.conf and somewhat works as a workaround for https://bugs.freedesktop.org/show_bug.cgi?id=59438 Bug 59438 - Fix inside --- diff --git a/src/fcxml.c b/src/fcxml.c index 8ff10b6..bd95580 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -2566,6 +2566,11 @@ FcParseMatch (FcConfigParse *parse) } FcVStackPopAndDestroy (parse); } + if (!rule) + { + FcConfigMessage (parse, FcSevereWarning, "No nor elements in "); + return; + } if (!FcConfigAddRule (parse->config, rule, kind)) FcConfigMessage (parse, FcSevereError, "out of memory"); }