[cairo-commit] src/cairo-ps-surface.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Oct 21 03:12:07 PDT 2008
src/cairo-ps-surface.c | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 29da47be60b0373ff93769f9f373a20b15a01e0f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Oct 21 10:42:41 2008 +0100
[ps] Check for an empty font subset.
Return early before trying to emit an empty subset into the document -
avoids a potential use of an uninitialised status variable.
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 3a0e982..816f0ea 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -480,6 +480,9 @@ _cairo_ps_surface_emit_type3_font_subset (cairo_ps_surface_t *surface,
cairo_surface_t *type3_surface;
double width;
+ if (font_subset->num_glyphs == 0)
+ return CAIRO_STATUS_SUCCESS;
+
#if DEBUG_PS
_cairo_output_stream_printf (surface->final_stream,
"%% _cairo_ps_surface_emit_type3_font_subset\n");
More information about the cairo-commit
mailing list