mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 08:28:03 +02:00
[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:
parent
09651a1c1a
commit
e6219f7116
1 changed files with 4 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue