From f4007a672834df25f0f9b6a918c135d2b79a3784 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 20 Mar 2003 02:00:15 +0000 Subject: [PATCH] Avoid crashing on empty test/edit lists --- src/fccfg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; } } -- 2.39.5