mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-09 08:50:24 +01:00
In cairo_text_path(), bail out if zero glyphs
This commit is contained in:
parent
4f138e4af5
commit
3ab9ca54aa
1 changed files with 4 additions and 5 deletions
|
|
@ -2904,12 +2904,11 @@ cairo_text_path (cairo_t *cr, const char *utf8)
|
|||
x, y,
|
||||
&glyphs, &num_glyphs);
|
||||
|
||||
if (cr->status) {
|
||||
if (glyphs)
|
||||
free (glyphs);
|
||||
_cairo_set_error (cr, cr->status);
|
||||
if (cr->status)
|
||||
goto BAIL;
|
||||
|
||||
if (num_glyphs == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
cr->status = _cairo_gstate_glyph_path (cr->gstate,
|
||||
glyphs, num_glyphs,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue