[cairo-commit] cairo/src cairo_gstate.c,1.65,1.66

Carl Worth commit at pdx.freedesktop.org
Sun Nov 14 10:07:56 PST 2004


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv18498/src

Modified Files:
	cairo_gstate.c 
Log Message:

        * src/cairo_gstate.c (_cairo_gstate_select_font): Don't destroy a
        NULL font.


Index: cairo_gstate.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_gstate.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- cairo_gstate.c	14 Nov 2004 03:46:18 -0000	1.65
+++ cairo_gstate.c	14 Nov 2004 18:07:54 -0000	1.66
@@ -1992,10 +1992,10 @@
 			   cairo_font_slant_t   slant, 
 			   cairo_font_weight_t  weight)
 {
-    _cairo_unscaled_font_destroy (gstate->font);
+    if (gstate->font)
+	_cairo_unscaled_font_destroy (gstate->font);
 
     gstate->font = _cairo_unscaled_font_create (family, slant, weight);
-
     if (gstate->font == NULL)
 	return CAIRO_STATUS_NO_MEMORY;
 




More information about the cairo-commit mailing list