[cairo-commit] src/cairo.c

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Mar 5 13:33:57 PST 2007


 src/cairo.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

New commits:
diff-tree 3ab9ca54aa490438dbbfae7b5f1cde0bd98352cd (from 4f138e4af56da60a83fd187f87cde19544ba3ab1)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Mar 5 16:33:46 2007 -0500

    In cairo_text_path(), bail out if zero glyphs

diff --git a/src/cairo.c b/src/cairo.c
index de3eb74..355fcae 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -2904,12 +2904,11 @@ cairo_text_path  (cairo_t *cr, const cha
 					       x, y,
 					       &glyphs, &num_glyphs);
 
-    if (cr->status) {
-	if (glyphs)
-	    free (glyphs);
-	_cairo_set_error (cr, cr->status);
+    if (cr->status)
+	goto BAIL;
+
+    if (num_glyphs == 0)
 	return;
-    }
 
     cr->status = _cairo_gstate_glyph_path (cr->gstate,
 					   glyphs, num_glyphs,


More information about the cairo-commit mailing list