diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2006-12-23 17:08:04 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2006-12-23 17:08:04 -0500 |
commit | 8fd7328ebb77b0a641cf30bded85e482ea63ad97 (patch) | |
tree | b01816f2efcd34f51ac9ac2873d4573fae95e272 /src/cairo-scaled-font.c | |
parent | 3212fc4f0fcc66ec3a93994f253c1477eb434572 (diff) |
Don't call into backends if num_glyphs is zero (#5177)
Just return success in _cairo_scaled_font_show_glyphs() and
_cairo_surface_show_glyphs() if num_glyphs is zero.
Diffstat (limited to 'src/cairo-scaled-font.c')
-rwxr-xr-x | src/cairo-scaled-font.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c index e07ab537..73afb5ff 100755 --- a/src/cairo-scaled-font.c +++ b/src/cairo-scaled-font.c @@ -920,6 +920,9 @@ _cairo_scaled_font_show_glyphs (cairo_scaled_font_t *scaled_font, if (scaled_font->status) return scaled_font->status; + if (!num_glyphs) + return CAIRO_STATUS_SUCCESS; + if (scaled_font->backend->show_glyphs != NULL) { status = scaled_font->backend->show_glyphs (scaled_font, op, pattern, |