Mercurial > emacs
changeset 93659:f606935ea4be
(uniscribe_check_otf): Add GC protection before consing.
Use CAR_SAFE to increment loop.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Fri, 04 Apr 2008 11:59:09 +0000 |
parents | 792fb2cc28be |
children | 96c69ebb9cfa |
files | src/w32uniscribe.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/w32uniscribe.c Fri Apr 04 11:43:39 2008 +0000 +++ b/src/w32uniscribe.c Fri Apr 04 11:59:09 2008 +0000 @@ -563,6 +563,7 @@ HFONT check_font, old_font; DWORD table; int i, retval = 0; + struct gcpro gcpro1; /* Check the spec is in the right format. */ if (!CONSP (otf_spec) || Flength (otf_spec) < 3) @@ -599,6 +600,10 @@ check_font = CreateFontIndirect (font); old_font = SelectObject (context, check_font); + /* Everything else is contained within otf_spec so should get + marked along with it. */ + GCPRO1 (otf_spec); + /* Scan GSUB and GPOS tables. */ for (i = 0; i < 2; i++) { @@ -676,7 +681,7 @@ documentation in font_prop_validate_otf, so count them. */ n_match_features = 0; rest = features[i]; - for (feature = XCAR (rest); CONSP (rest); feature = XCAR (rest)) + for (feature = XCAR (rest); CONSP (rest); feature = CAR_SAFE (rest)) { rest = XCDR (rest); if (!NILP (feature))