summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-08-19 18:21:31 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-08-19 18:21:31 +0000
commit313b8ffabfed21206a4220031e071d4947512bf7 (patch)
tree8d3f6d32486e76103cf64bf9b61bc300be620787
parent37ef7f0389b86f6d8c047d6a26979ca7b04d65c4 (diff)
downloadgdk-pixbuf-313b8ffabfed21206a4220031e071d4947512bf7.tar.gz
Handle pixbuf being NULL without warnings. Also, don't leak pixbuf
2005-08-19 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilechooserbutton.c (change_icon_theme) (model_add_special, model_add_special, model_add_volumes): Handle pixbuf being NULL without warnings. Also, don't leak pixbuf references when the icon theme is changed.
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.pre-2-105
-rw-r--r--ChangeLog.pre-2-85
-rw-r--r--gtk/gtkfilechooserbutton.c12
4 files changed, 24 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d11ed4aa..474217043 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2005-08-19 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkfilechooserbutton.c (change_icon_theme)
+ (model_add_special, model_add_special, model_add_volumes):
+ Handle pixbuf being NULL without warnings. Also, don't
+ leak pixbuf references when the icon theme is changed.
+
* gtk/gtkmain.c (gtk_get_event_widget): Don't access
the user data on destroyed windows, since at best
it can be a stale pointer. (#313953, Robin Green)
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 9d11ed4aa..474217043 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,5 +1,10 @@
2005-08-19 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkfilechooserbutton.c (change_icon_theme)
+ (model_add_special, model_add_special, model_add_volumes):
+ Handle pixbuf being NULL without warnings. Also, don't
+ leak pixbuf references when the icon theme is changed.
+
* gtk/gtkmain.c (gtk_get_event_widget): Don't access
the user data on destroyed windows, since at best
it can be a stale pointer. (#313953, Robin Green)
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 9d11ed4aa..474217043 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,5 +1,10 @@
2005-08-19 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkfilechooserbutton.c (change_icon_theme)
+ (model_add_special, model_add_special, model_add_volumes):
+ Handle pixbuf being NULL without warnings. Also, don't
+ leak pixbuf references when the icon theme is changed.
+
* gtk/gtkmain.c (gtk_get_event_widget): Don't access
the user data on destroyed windows, since at best
it can be a stale pointer. (#313953, Robin Green)
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index c7f1e45a8..7b41b036d 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -1109,6 +1109,9 @@ change_icon_theme (GtkFileChooserButton *button)
gtk_list_store_set (GTK_LIST_STORE (priv->model), &iter,
ICON_COLUMN, pixbuf,
-1);
+
+ if (pixbuf)
+ g_object_unref (pixbuf);
}
while (gtk_tree_model_iter_next (priv->model, &iter));
@@ -1311,7 +1314,8 @@ model_add_special (GtkFileChooserButton *button)
DATA_COLUMN, path,
-1);
- g_object_unref (pixbuf);
+ if (pixbuf)
+ g_object_unref (pixbuf);
button->priv->n_special++;
#ifndef G_OS_WIN32
@@ -1339,7 +1343,8 @@ model_add_special (GtkFileChooserButton *button)
DATA_COLUMN, path,
-1);
- g_object_unref (pixbuf);
+ if (pixbuf)
+ g_object_unref (pixbuf);
button->priv->n_special++;
}
}
@@ -1379,7 +1384,8 @@ model_add_volumes (GtkFileChooserButton *button,
DATA_COLUMN, volumes->data,
-1);
- g_object_unref (pixbuf);
+ if (pixbuf)
+ g_object_unref (pixbuf);
g_free (display_name);
button->priv->n_volumes++;