[win32] Correct error paths in text_to_glyphs().

Carl spotted that 1db894 introduced an error into text_to_glyphs() such
that following an allocation error the code would attempt to thaw an
unfrozen glyph cache, leading to an attempt to unlock an unlocked mutex -
which causes a deadlock under win32.
This commit is contained in:
Chris Wilson 2008-10-22 17:53:05 +01:00
parent 09651a1c1a
commit e6219f7116

View file

@ -672,7 +672,8 @@ _cairo_win32_scaled_font_type1_text_to_glyphs (cairo_win32_scaled_font_t *scaled
&scaled_glyph);
if (status) {
free (*glyphs);
goto FAIL3;
*glyphs = NULL;
break;
}
x = scaled_glyph->x_advance;
@ -682,10 +683,10 @@ _cairo_win32_scaled_font_type1_text_to_glyphs (cairo_win32_scaled_font_t *scaled
y_pos += y;
}
FAIL3:
_cairo_scaled_font_thaw_cache (&scaled_font->base);
cairo_win32_scaled_font_done_font (&scaled_font->base);
FAIL3:
cairo_win32_scaled_font_done_font (&scaled_font->base);
FAIL2:
free (glyph_indices);
FAIL1: