mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-21 12:08:10 +02:00
[cairo-scaled-font-subsets] Destroy the glyph if we fail to cache it.
If we fail to insert the glyph into the sub_font glyph cache then we must destroy it before propagating the error.
This commit is contained in:
parent
76e758df5b
commit
37d8c18b3f
1 changed files with 3 additions and 1 deletions
|
|
@ -338,8 +338,10 @@ _cairo_sub_font_map_glyph (cairo_sub_font_t *sub_font,
|
|||
}
|
||||
|
||||
status = _cairo_hash_table_insert (sub_font->sub_font_glyphs, &sub_font_glyph->base);
|
||||
if (status)
|
||||
if (status) {
|
||||
_cairo_sub_font_glyph_destroy (sub_font_glyph);
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
subset_glyph->font_id = sub_font->font_id;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue