summaryrefslogtreecommitdiffstats
path: root/src/helper/pixbuf-ops.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-07-13 22:21:37 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-07-13 22:21:37 +0000
commit0d6be77f2af241e47d0df3f19619db85ca8127e7 (patch)
tree510d535eb41530772c79218ece39023d85d42c93 /src/helper/pixbuf-ops.cpp
parentFix crashes during offscreen rendering, part 1 (diff)
parentFix crashes in print preview (diff)
downloadinkscape-0d6be77f2af241e47d0df3f19619db85ca8127e7.tar.gz
inkscape-0d6be77f2af241e47d0df3f19619db85ca8127e7.zip
Merge from trunk to pull in fix for LP #806105
(bzr r10347.1.13)
Diffstat (limited to 'src/helper/pixbuf-ops.cpp')
-rw-r--r--src/helper/pixbuf-ops.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp
index 226042337..e1ced31b4 100644
--- a/src/helper/pixbuf-ops.cpp
+++ b/src/helper/pixbuf-ops.cpp
@@ -108,6 +108,7 @@ sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*/,
GSList *items_only)
{
+ if (width == 0 || height == 0) return NULL;
GdkPixbuf* pixbuf = NULL;
/* Create new arena for offscreen rendering*/
@@ -168,8 +169,8 @@ sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*/,
pixbuf = gdk_pixbuf_new_from_data(cairo_image_surface_get_data(surface),
GDK_COLORSPACE_RGB, TRUE,
8, width, height, cairo_image_surface_get_stride(surface),
- (GdkPixbufDestroyNotify) cairo_surface_destroy,
- NULL);
+ ink_cairo_pixbuf_cleanup,
+ surface);
convert_pixbuf_argb32_to_normal(pixbuf);
}
else