summaryrefslogtreecommitdiff
path: root/gtk/gtktreeitem.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtktreeitem.c')
-rw-r--r--gtk/gtktreeitem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtktreeitem.c b/gtk/gtktreeitem.c
index ed607780d3..328d52d141 100644
--- a/gtk/gtktreeitem.c
+++ b/gtk/gtktreeitem.c
@@ -388,6 +388,8 @@ gtk_tree_item_add_pixmaps (GtkTreeItem *tree_item)
pixmap_node = g_new (GtkTreePixmaps, 1);
pixmap_node->colormap = colormap;
+ gdk_colormap_ref (colormap);
+
pixmap_node->refcount = 1;
/* create pixmaps for plus icon */
@@ -424,6 +426,7 @@ gtk_tree_item_remove_pixmaps (GtkTreeItem *tree_item)
if (--pixmap_node->refcount == 0)
{
+ gdk_colormap_unref (pixmap_node->colormap);
gdk_pixmap_unref (pixmap_node->pixmap_plus);
gdk_bitmap_unref (pixmap_node->mask_plus);
gdk_pixmap_unref (pixmap_node->pixmap_minus);