Warn if no <test> nor <edit> elements in <match>
[platform/upstream/fontconfig.git] / src / fcxml.c
index 8ff10b6..bd95580 100644 (file)
@@ -2566,6 +2566,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");
 }