[cairo-commit] src/cairo-ps-surface.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Feb 24 12:29:16 PST 2009


 src/cairo-ps-surface.c |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit eb2a73ba6d290497cabb0f917c0375eea919178e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Feb 24 20:27:36 2009 +0000

    [ps] Check the status of _cairo_type3_glyph_surface_create()
    
    Doing so serves two purposes. The first is to do an early error check and
    the second is to clearly initialise the status variable.

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 169a539..346bb88 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -505,6 +505,9 @@ _cairo_ps_surface_emit_type3_font_subset (cairo_ps_surface_t		*surface,
 						       NULL,
 						       _cairo_ps_emit_imagemask,
 						       surface->font_subsets);
+    status = type3_surface->status;
+    if (unlikely (status))
+	return status;
 
     for (i = 0; i < font_subset->num_glyphs; i++) {
 	if (font_subset->glyph_names != NULL) {


More information about the cairo-commit mailing list