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,7 +134,9 @@ FcSubstDestroy (FcSubst *s)
while (s) while (s)
{ {
n = s->next; n = s->next;
if (s->test)
FcTestDestroy (s->test); FcTestDestroy (s->test);
if (s->edit)
FcEditDestroy (s->edit); FcEditDestroy (s->edit);
s = n; s = n;
} }