]> git.wh0rd.org Git - fontconfig.git/commitdiff
Because we've changed FcPatternAddString to use FcStrStaticName and not
authorPatrick Lam <plam@MIT.EDU>
Thu, 8 Dec 2005 05:54:27 +0000 (05:54 +0000)
committerPatrick Lam <plam@MIT.EDU>
Thu, 8 Dec 2005 05:54:27 +0000 (05:54 +0000)
    FcValueSave, explicitly handle the case of a null string.

ChangeLog
src/fcpat.c

index b13ebbb9e93209b7b5f8fdb784716d8d46925b5b..2b4b555e0cf516fbe1f01c5590c821d059dea41d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-07  Patrick Lam  <plam@mit.edu>
+       * 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  <plam@mit.edu>
        * fc-cat/fc-cat.c (FcCachePrintSet, FcCacheGlobalFileReadAndPrint):
 
index a626ab6b120256bbb094eecaf9381640126f8a86..e2bdd3035f1dfd03067dd4d50531c007115d6b4b 100644 (file)
@@ -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);