From: Keith Packard Date: Thu, 20 Mar 2003 02:00:15 +0000 (+0000) Subject: Avoid crashing on empty test/edit lists X-Git-Tag: fc-2_1_93~15 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f4007a672834df25f0f9b6a918c135d2b79a3784;p=fontconfig.git Avoid crashing on empty test/edit lists --- diff --git a/src/fccfg.c b/src/fccfg.c index d8bbe8d..0d7f17e 100644 --- a/src/fccfg.c +++ b/src/fccfg.c @@ -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; } }