From: Patrick Lam Date: Thu, 8 Dec 2005 05:54:27 +0000 (+0000) Subject: Because we've changed FcPatternAddString to use FcStrStaticName and not X-Git-Tag: fc-2_3_93~6 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=204da5a8b88a73e54a9bab0537db7ff4fe8c6374;p=fontconfig.git Because we've changed FcPatternAddString to use FcStrStaticName and not FcValueSave, explicitly handle the case of a null string. --- diff --git a/ChangeLog b/ChangeLog index b13ebbb..2b4b555 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-12-07 Patrick Lam + * src/fcpat.c (FcPatternAddString): + + Because we've changed FcPatternAddString to use FcStrStaticName + and not FcValueSave, explicitly handle the case of a null string. + 2005-12-06 Patrick Lam * fc-cat/fc-cat.c (FcCachePrintSet, FcCacheGlobalFileReadAndPrint): diff --git a/src/fcpat.c b/src/fcpat.c index a626ab6..e2bdd30 100644 --- a/src/fcpat.c +++ b/src/fcpat.c @@ -1029,6 +1029,13 @@ FcPatternAddString (FcPattern *p, const char *object, const FcChar8 *s) { FcValue v; + if (!s) + { + v.type = FcTypeVoid; + v.u.s = 0; + return FcPatternAdd (p, object, v, FcTrue); + } + v.type = FcTypeString; v.u.s = FcStrStaticName(s); return FcPatternAdd (p, object, v, FcTrue);