]> git.wh0rd.org Git - fontconfig.git/commitdiff
Avoid crashing on empty test/edit lists
authorKeith Packard <keithp@keithp.com>
Thu, 20 Mar 2003 02:00:15 +0000 (02:00 +0000)
committerKeith Packard <keithp@keithp.com>
Thu, 20 Mar 2003 02:00:15 +0000 (02:00 +0000)
src/fccfg.c

index d8bbe8ddb595ec78c1bd124327ef12903f2fdebd..0d7f17e3392fe1b6b1ebf61ad8a0e0276237fb6c 100644 (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;
     }
 }