[gnome-flashback] screenshot: fix build warning



commit 1acc3eef42ac8d4dd3a9783eb699f14c97f15a3f
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Mar 22 00:10:57 2017 +0200

    screenshot: fix build warning

 gnome-flashback/libscreenshot/gf-screenshot.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gnome-flashback/libscreenshot/gf-screenshot.c b/gnome-flashback/libscreenshot/gf-screenshot.c
index 6926231..c087bfa 100644
--- a/gnome-flashback/libscreenshot/gf-screenshot.c
+++ b/gnome-flashback/libscreenshot/gf-screenshot.c
@@ -67,6 +67,13 @@ typedef enum
 
 G_DEFINE_TYPE (GfScreenshot, gf_screenshot, G_TYPE_OBJECT)
 
+static void
+free_pixels (guchar   *pixels,
+             gpointer  data)
+{
+  g_free (pixels);
+}
+
 static GdkPixbuf *
 pixels_to_pixbuf (gulong *pixels,
                   gint    width,
@@ -92,7 +99,7 @@ pixels_to_pixbuf (gulong *pixels,
 
   return gdk_pixbuf_new_from_data (data, GDK_COLORSPACE_RGB, TRUE, 8,
                                    width, height, width * 4,
-                                   g_free, NULL);
+                                   free_pixels, NULL);
 }
 
 static GdkPixbuf *


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