]> Pileus Git - ~andy/gtk/commitdiff
if we set a new stock_id and there was a previous stock_id, unref the
authorKristian Rietveld <kris@gtk.org>
Wed, 17 Dec 2003 22:56:27 +0000 (22:56 +0000)
committerKristian Rietveld <kristian@src.gnome.org>
Wed, 17 Dec 2003 22:56:27 +0000 (22:56 +0000)
Wed Dec 17 23:50:56 2003  Kristian Rietveld  <kris@gtk.org>

* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_set_property):
if we set a new stock_id and there was a previous stock_id, unref
the pixbuf (since it was used to renderer the previous stock_id
and stock_id might have been set to NULL now). (Fixes #122966).

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcellrendererpixbuf.c

index c379ace58cb35cb50d4c4cedae561cd3a0be43b6..330716fa942199b99afa3bf3d11cdfbc62428e8a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Wed Dec 17 23:50:56 2003  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_set_property):
+       if we set a new stock_id and there was a previous stock_id, unref
+       the pixbuf (since it was used to renderer the previous stock_id
+       and stock_id might have been set to NULL now). (Fixes #122966).
+
 2003-12-17  Marco Pesenti Gritti  <marco@gnome.org>
 
        * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_get_iter):
index c379ace58cb35cb50d4c4cedae561cd3a0be43b6..330716fa942199b99afa3bf3d11cdfbc62428e8a 100644 (file)
@@ -1,3 +1,10 @@
+Wed Dec 17 23:50:56 2003  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_set_property):
+       if we set a new stock_id and there was a previous stock_id, unref
+       the pixbuf (since it was used to renderer the previous stock_id
+       and stock_id might have been set to NULL now). (Fixes #122966).
+
 2003-12-17  Marco Pesenti Gritti  <marco@gnome.org>
 
        * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_get_iter):
index c379ace58cb35cb50d4c4cedae561cd3a0be43b6..330716fa942199b99afa3bf3d11cdfbc62428e8a 100644 (file)
@@ -1,3 +1,10 @@
+Wed Dec 17 23:50:56 2003  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_set_property):
+       if we set a new stock_id and there was a previous stock_id, unref
+       the pixbuf (since it was used to renderer the previous stock_id
+       and stock_id might have been set to NULL now). (Fixes #122966).
+
 2003-12-17  Marco Pesenti Gritti  <marco@gnome.org>
 
        * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_get_iter):
index c379ace58cb35cb50d4c4cedae561cd3a0be43b6..330716fa942199b99afa3bf3d11cdfbc62428e8a 100644 (file)
@@ -1,3 +1,10 @@
+Wed Dec 17 23:50:56 2003  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_set_property):
+       if we set a new stock_id and there was a previous stock_id, unref
+       the pixbuf (since it was used to renderer the previous stock_id
+       and stock_id might have been set to NULL now). (Fixes #122966).
+
 2003-12-17  Marco Pesenti Gritti  <marco@gnome.org>
 
        * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_get_iter):
index c379ace58cb35cb50d4c4cedae561cd3a0be43b6..330716fa942199b99afa3bf3d11cdfbc62428e8a 100644 (file)
@@ -1,3 +1,10 @@
+Wed Dec 17 23:50:56 2003  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_set_property):
+       if we set a new stock_id and there was a previous stock_id, unref
+       the pixbuf (since it was used to renderer the previous stock_id
+       and stock_id might have been set to NULL now). (Fixes #122966).
+
 2003-12-17  Marco Pesenti Gritti  <marco@gnome.org>
 
        * gtk/gtktreemodelsort.c: (gtk_tree_model_sort_get_iter):
index 64fa881354748cf6a07730d60dafc74e0669c1df..6c6a6007eae43275b2ce489bebcbeb20f1e5d6fb 100644 (file)
@@ -277,7 +277,14 @@ gtk_cell_renderer_pixbuf_set_property (GObject      *object,
       break;
     case PROP_STOCK_ID:
       if (cellinfo->stock_id)
-        g_free (cellinfo->stock_id);
+        {
+          if (cellpixbuf->pixbuf)
+            {
+              g_object_unref (cellpixbuf->pixbuf);
+              cellpixbuf->pixbuf = NULL;
+            }
+          g_free (cellinfo->stock_id);
+        }
       cellinfo->stock_id = g_strdup (g_value_get_string (value));
       break;
     case PROP_STOCK_SIZE: