mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-01 04:28:03 +02:00
ft: Convert an assert into an unlikely error return.
The assert depends upon good behaviour from fontconfig, which is no guaranteed under memfault, so return an error instead.
This commit is contained in:
parent
5672b7a18a
commit
87781ffbd9
1 changed files with 1 additions and 3 deletions
|
|
@ -2624,13 +2624,11 @@ _cairo_ft_resolve_pattern (FcPattern *pattern,
|
|||
}
|
||||
|
||||
status = _cairo_ft_unscaled_font_create_for_pattern (resolved, &unscaled);
|
||||
if (unlikely (status)) {
|
||||
if (unlikely (status || unscaled == NULL)) {
|
||||
font_face = (cairo_font_face_t *)&_cairo_font_face_nil;
|
||||
goto FREE_RESOLVED;
|
||||
}
|
||||
|
||||
assert (unscaled != NULL);
|
||||
|
||||
_get_pattern_ft_options (resolved, &ft_options);
|
||||
font_face = _cairo_ft_font_face_create (unscaled, &ft_options);
|
||||
_cairo_unscaled_font_destroy (&unscaled->base);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue