Merge branch 'bug-607' into 'master'

Don't leave a font face in an error state after a scaled font creation failure

Closes #607

See merge request cairo/cairo!402
This commit is contained in:
Uli Schlachter 2023-01-10 17:10:10 +00:00
commit 5ecfc2eb5d

View file

@ -1176,9 +1176,7 @@ cairo_scaled_font_create (cairo_font_face_t *font_face,
status = font_face->backend->scaled_font_create (font_face, font_matrix,
ctm, options, &scaled_font);
/* Did we leave the backend in an error state? */
if (unlikely (status)) {
status = _cairo_font_face_set_error (font_face, status);
_cairo_scaled_font_map_unlock ();
if (font_face != original_font_face)
cairo_font_face_destroy (font_face);