diff options
Diffstat (limited to 'fontconfig')
-rw-r--r-- | fontconfig/fonts.dtd | 2 | ||||
-rw-r--r-- | fontconfig/src/fcxml.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/fontconfig/fonts.dtd b/fontconfig/fonts.dtd index 4c38e77f0..479f2c0fb 100644 --- a/fontconfig/fonts.dtd +++ b/fontconfig/fonts.dtd @@ -140,7 +140,7 @@ if 'target' is 'font', execute the match on the result of a font selection. --> -<!ELEMENT match (test*, edit*)+> +<!ELEMENT match (test|edit)+> <!ATTLIST match target (pattern|font|scan) "pattern"> diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c index 1a3cef460..da9cb5ddc 100644 --- a/fontconfig/src/fcxml.c +++ b/fontconfig/src/fcxml.c @@ -2567,6 +2567,11 @@ FcParseMatch (FcConfigParse *parse) } FcVStackPopAndDestroy (parse); } + if (!rule) + { + FcConfigMessage (parse, FcSevereWarning, "No <test> nor <edit> elements in <match>"); + return; + } if (!FcConfigAddRule (parse->config, rule, kind)) FcConfigMessage (parse, FcSevereError, "out of memory"); } |