aboutsummaryrefslogtreecommitdiffstats
path: root/libgnomecanvas
diff options
context:
space:
mode:
Diffstat (limited to 'libgnomecanvas')
-rw-r--r--libgnomecanvas/gnome-canvas-pixbuf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libgnomecanvas/gnome-canvas-pixbuf.c b/libgnomecanvas/gnome-canvas-pixbuf.c
index 32e83bbe1d..910b61b8e7 100644
--- a/libgnomecanvas/gnome-canvas-pixbuf.c
+++ b/libgnomecanvas/gnome-canvas-pixbuf.c
@@ -280,8 +280,10 @@ gnome_canvas_pixbuf_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
cr = gdk_cairo_create (drawable);
gnome_canvas_item_i2c_matrix (item, &matrix);
- if (cairo_matrix_invert (&matrix))
+ if (cairo_matrix_invert (&matrix)) {
+ cairo_destroy (cr);
return;
+ }
cairo_transform (cr, &matrix);
gdk_cairo_set_source_pixbuf (cr, priv->pixbuf, 0, 0);