diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-03 19:18:49 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-03 19:18:49 +0100 |
commit | 87781ffbd914bca29b4d744fb48678ab06a07108 (patch) | |
tree | dac8895326cb574e4b5e785661c8b445392cb4a4 /src/cairo-ft-font.c | |
parent | 5672b7a18a34456862977a1cf678bf6575dcc3f4 (diff) |
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.
Diffstat (limited to 'src/cairo-ft-font.c')
-rw-r--r-- | src/cairo-ft-font.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index 82f0e659..ae097409 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -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); |