diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2011-07-13 21:43:55 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2011-07-13 21:43:55 +0000 |
| commit | 6973283a77d7becd6a5a1bd7396206c6840ca785 (patch) | |
| tree | 548ecd769aee550eb36b1ccfce7bcc95651ccdd9 /src/helper/pixbuf-ops.cpp | |
| parent | UI fixes for gcodetools extension (diff) | |
| download | inkscape-6973283a77d7becd6a5a1bd7396206c6840ca785.tar.gz inkscape-6973283a77d7becd6a5a1bd7396206c6840ca785.zip | |
Fix crashes in print preview
Fixed bugs:
- https://launchpad.net/bugs/806105
(bzr r10450)
Diffstat (limited to 'src/helper/pixbuf-ops.cpp')
| -rw-r--r-- | src/helper/pixbuf-ops.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp index f6796f2ad..9ebbe13c7 100644 --- a/src/helper/pixbuf-ops.cpp +++ b/src/helper/pixbuf-ops.cpp @@ -107,6 +107,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*/ @@ -167,8 +168,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 |
