From caae5c81237ac7c37c987884ff6ebeb5db749048 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 4 Oct 2004 14:48:57 +0000 Subject: [PATCH] Ref the new icons before unreffing the old ones. (#154468, Morten 2004-10-04 Matthias Clasen * gtk/gtkwindow.c (gtk_window_set_icon_list): Ref the new icons before unreffing the old ones. (#154468, Morten Welinder) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkwindow.c | 5 +++-- 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d806eb62ae..858503a954 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-10-04 Matthias Clasen + + * gtk/gtkwindow.c (gtk_window_set_icon_list): Ref the new + icons before unreffing the old ones. (#154468, Morten Welinder) + 2004-10-03 Matthias Clasen * gtk/gtktreeviewcolumn.c diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d806eb62ae..858503a954 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2004-10-04 Matthias Clasen + + * gtk/gtkwindow.c (gtk_window_set_icon_list): Ref the new + icons before unreffing the old ones. (#154468, Morten Welinder) + 2004-10-03 Matthias Clasen * gtk/gtktreeviewcolumn.c diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index d806eb62ae..858503a954 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2004-10-04 Matthias Clasen + + * gtk/gtkwindow.c (gtk_window_set_icon_list): Ref the new + icons before unreffing the old ones. (#154468, Morten Welinder) + 2004-10-03 Matthias Clasen * gtk/gtktreeviewcolumn.c diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index d806eb62ae..858503a954 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2004-10-04 Matthias Clasen + + * gtk/gtkwindow.c (gtk_window_set_icon_list): Ref the new + icons before unreffing the old ones. (#154468, Morten Welinder) + 2004-10-03 Matthias Clasen * gtk/gtktreeviewcolumn.c diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 4e59735031..3470f22b09 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -2655,14 +2655,15 @@ gtk_window_set_icon_list (GtkWindow *window, if (info->icon_list == list) /* check for NULL mostly */ return; + g_list_foreach (list, + (GFunc) g_object_ref, NULL); + g_list_foreach (info->icon_list, (GFunc) g_object_unref, NULL); g_list_free (info->icon_list); info->icon_list = g_list_copy (list); - g_list_foreach (info->icon_list, - (GFunc) g_object_ref, NULL); g_object_notify (G_OBJECT (window), "icon");