Avoid crashing on empty test/edit lists

This commit is contained in:
Keith Packard 2003-03-20 02:00:15 +00:00
parent 3fbd50e486
commit f4007a6728
1 changed files with 4 additions and 2 deletions

View File

@ -134,8 +134,10 @@ FcSubstDestroy (FcSubst *s)
while (s)
{
n = s->next;
FcTestDestroy (s->test);
FcEditDestroy (s->edit);
if (s->test)
FcTestDestroy (s->test);
if (s->edit)
FcEditDestroy (s->edit);
s = n;
}
}