[gnome-color-manager] trivial: fix up a warning when we unref GcmImage
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] trivial: fix up a warning when we unref GcmImage
- Date: Fri, 1 Jan 2010 11:12:12 +0000 (UTC)
commit e3bc89763212be84743e53d256caf23495b5d3c3
Author: Richard Hughes <richard hughsie com>
Date: Fri Jan 1 11:10:46 2010 +0000
trivial: fix up a warning when we unref GcmImage
src/gcm-image.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-image.c b/src/gcm-image.c
index 2ccb7bd..7a46905 100644
--- a/src/gcm-image.c
+++ b/src/gcm-image.c
@@ -253,6 +253,8 @@ gcm_image_notify_pixbuf_cb (GObject *object, GParamSpec *pspec, GcmImage *image)
/* check */
pixbuf = gtk_image_get_pixbuf (GTK_IMAGE(image));
+ if (pixbuf == NULL)
+ goto out;
applied = g_object_get_data (G_OBJECT(pixbuf), "cms-converted-pixbuf");
if (applied != NULL) {
egg_debug ("already copied and converted pixbuf, use gcm_image_cms_convert_pixbuf() instead");
@@ -272,6 +274,7 @@ gcm_image_notify_pixbuf_cb (GObject *object, GParamSpec *pspec, GcmImage *image)
g_object_set_data (G_OBJECT(pixbuf), "cms-converted-pixbuf", (gpointer)"true");
}
out:
+ /* we do not own the pixbuf */
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]