From c9581b47c4409612e8f2d4f67a402c566ba8330e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 1 Jan 2013 20:20:12 -0600 Subject: [PATCH] Don't crash in FcPatternDestroy with NULL pattern --- src/fcpat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fcpat.c b/src/fcpat.c index 0aab7a0..d93eb73 100644 --- a/src/fcpat.c +++ b/src/fcpat.c @@ -359,6 +359,9 @@ FcPatternDestroy (FcPattern *p) int i; FcPatternElt *elts; + if (!p) + return; + if (p->ref == FC_REF_CONSTANT) { FcCacheObjectDereference (p);