]> git.wh0rd.org Git - fontconfig.git/commitdiff
Handle pattern elements moving during multiple edits
authorKeith Packard <keithp@keithp.com>
Tue, 22 Apr 2003 06:27:27 +0000 (06:27 +0000)
committerKeith Packard <keithp@keithp.com>
Tue, 22 Apr 2003 06:27:27 +0000 (06:27 +0000)
src/fccfg.c

index 87c38bc9f0e0b3f78ff67ed0ea30419e729d5a24..36a76a416c5619f54987872232dfe2c805ebb357 100644 (file)
@@ -1232,6 +1232,14 @@ FcConfigSubstituteWithPat (FcConfig    *config,
                    !FcStrCmpIgnoreCase ((FcChar8 *) t->field, 
                                         (FcChar8 *) e->field))
                {
+                   /* 
+                    * KLUDGE - the pattern may have been reallocated or
+                    * things may have been inserted or deleted above
+                    * this element by other edits.  Go back and find
+                    * the element again
+                    */
+                   if (e != s->edit && st[i].elt)
+                       st[i].elt = FcPatternFindElt (p, t->field);
                    if (!st[i].elt)
                        t = 0;
                    break;