Commit efac784b authored by Akira TAGOH's avatar Akira TAGOH

Fix dereferencing null pointer

parent 1ac22184
......@@ -2616,12 +2616,13 @@ FcRuleSetAdd (FcRuleSet *rs,
switch (r->type)
{
case FcRuleTest:
if (r->u.test &&
r->u.test->kind == FcMatchDefault)
r->u.test->kind = kind;
if (n < r->u.test->object)
n = r->u.test->object;
if (r->u.test)
{
if (r->u.test->kind == FcMatchDefault)
r->u.test->kind = kind;
if (n < r->u.test->object)
n = r->u.test->object;
}
break;
case FcRuleEdit:
if (n < r->u.edit->object)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment