[cairo] crasher
John McCutchan
ttb at tentacle.dhs.org
Sat Mar 19 16:11:00 PST 2005
On Sat, 2005-03-19 at 19:02 -0500, John McCutchan wrote:
> Yo,
>
> This simple program crashes cairo. Am I doing something wrong or what?
>
> https://bugs.freedesktop.org/show_bug.cgi?id=2776
>
Is this the right fix?
Index: src/cairo_gstate.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_gstate.c,v
retrieving revision 1.94
diff -u -r1.94 cairo_gstate.c
--- src/cairo_gstate.c 18 Mar 2005 22:28:53 -0000 1.94
+++ src/cairo_gstate.c 20 Mar 2005 00:08:54 -0000
@@ -174,7 +174,8 @@
_cairo_path_fini (&gstate->path);
CLEANUP_FONT:
- cairo_font_destroy (gstate->font);
+ if (gstate->font)
+ cairo_font_destroy (gstate->font);
gstate->font = NULL;
if (gstate->font_family) {
--
John McCutchan <ttb at tentacle.dhs.org>
More information about the cairo
mailing list