[gnome-color-manager] Prevent a crash when profiling a printer



commit 53bcec7250cb72e45d00383486fbbeba0ff74df8
Author: Richard Hughes <richard hughsie com>
Date:   Wed Oct 8 19:38:25 2014 +0100

    Prevent a crash when profiling a printer
    
    Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=732869

 src/gcm-print.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/src/gcm-print.c b/src/gcm-print.c
index 9fd8c7d..e7925c7 100644
--- a/src/gcm-print.c
+++ b/src/gcm-print.c
@@ -140,11 +140,7 @@ gcm_print_draw_page_cb (GtkPrintOperation *operation, GtkPrintContext *context,
        }
 
        /* create a surface of the pixmap */
-       surface = cairo_image_surface_create_for_data (gdk_pixbuf_get_pixels (pixbuf),
-                                                      CAIRO_FORMAT_RGB24,
-                                                      gdk_pixbuf_get_width (pixbuf),
-                                                      gdk_pixbuf_get_height (pixbuf),
-                                                      gdk_pixbuf_get_rowstride (pixbuf));
+       surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, 1, NULL);
 
        /* scale image to fill the page, but preserve aspect */
        scale = MIN (width / gdk_pixbuf_get_width (pixbuf), height / gdk_pixbuf_get_height (pixbuf));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]