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)
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++)
{
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))