summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-07-13 21:43:55 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-07-13 21:43:55 +0000
commit6973283a77d7becd6a5a1bd7396206c6840ca785 (patch)
tree548ecd769aee550eb36b1ccfce7bcc95651ccdd9 /src/ui
parentUI fixes for gcodetools extension (diff)
downloadinkscape-6973283a77d7becd6a5a1bd7396206c6840ca785.tar.gz
inkscape-6973283a77d7becd6a5a1bd7396206c6840ca785.zip
Fix crashes in print preview
Fixed bugs: - https://launchpad.net/bugs/806105 (bzr r10450)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/cache/svg_preview_cache.cpp3
-rw-r--r--src/ui/dialog/color-item.cpp4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/ui/cache/svg_preview_cache.cpp b/src/ui/cache/svg_preview_cache.cpp
index fd7070bab..edd7c9431 100644
--- a/src/ui/cache/svg_preview_cache.cpp
+++ b/src/ui/cache/svg_preview_cache.cpp
@@ -79,8 +79,7 @@ GdkPixbuf* render_pixbuf(NRArenaItem* root, double scale_factor, const Geom::Rec
GDK_COLORSPACE_RGB,
TRUE,
8, psize, psize, cairo_image_surface_get_stride(s),
- (GdkPixbufDestroyNotify)cairo_surface_destroy,
- NULL);
+ ink_cairo_pixbuf_cleanup, s);
convert_pixbuf_argb32_to_normal(pixbuf);
return pixbuf;
diff --git a/src/ui/dialog/color-item.cpp b/src/ui/dialog/color-item.cpp
index 3463aa496..598827da9 100644
--- a/src/ui/dialog/color-item.cpp
+++ b/src/ui/dialog/color-item.cpp
@@ -225,7 +225,7 @@ static void colorItemDragBegin( GtkWidget */*widget*/, GdkDragContext* dc, gpoin
pixbuf = gdk_pixbuf_new_from_data(cairo_image_surface_get_data(s),
GDK_COLORSPACE_RGB, TRUE, 8,
width, height, cairo_image_surface_get_stride(s),
- (GdkPixbufDestroyNotify) cairo_surface_destroy, NULL);
+ ink_cairo_pixbuf_cleanup, s);
convert_pixbuf_argb32_to_normal(pixbuf);
} else {
Glib::RefPtr<Gdk::Pixbuf> thumb = Gdk::Pixbuf::create( Gdk::COLORSPACE_RGB, false, 8, width, height );
@@ -533,7 +533,7 @@ void ColorItem::_regenPreview(EekPreview * preview)
GdkPixbuf* pixbuf = gdk_pixbuf_new_from_data( cairo_image_surface_get_data(s),
GDK_COLORSPACE_RGB, TRUE, 8,
w, h, cairo_image_surface_get_stride(s),
- (GdkPixbufDestroyNotify) cairo_surface_destroy, NULL);
+ ink_cairo_pixbuf_cleanup, s);
convert_pixbuf_argb32_to_normal(pixbuf);
eek_preview_set_pixbuf( preview, pixbuf );
}