aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-icon-factory.c15
2 files changed, 8 insertions, 12 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 00faba7090..a0e1bf8f38 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-20 Harish Krishnaswamy <kharish@novell.com>
+
+ * e-icon-factory.c: (load_icon), (e_icon_factory_get_icon):
+ Remove unreachable code and fix the leak of basename.
+
2006-09-18 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #352450
diff --git a/e-util/e-icon-factory.c b/e-util/e-icon-factory.c
index 2a5cfb35f5..5471b5adab 100644
--- a/e-util/e-icon-factory.c
+++ b/e-util/e-icon-factory.c
@@ -124,6 +124,7 @@ load_icon (const char *icon_key, const char *icon_name, int size, int scale)
dent,
basename,
NULL);
+ g_free (basename);
if ((unscaled = gdk_pixbuf_new_from_file (filename, NULL)))
break;
}
@@ -308,18 +309,8 @@ e_icon_factory_get_icon (const char *icon_name, int icon_size)
pthread_mutex_lock (&lock);
if (!(icon = g_hash_table_lookup (name_to_icon, icon_key))) {
- if (!(icon = load_icon (icon_key, icon_name, size, TRUE))) {
- g_warning ("Icon not found -- %s", icon_name);
-
- /* Create an empty icon so that we don't keep spitting
- out the same warning over and over, every time this
- icon is requested. */
-
- icon = icon_new (icon_key, NULL);
- g_hash_table_insert (name_to_icon, icon->name, icon);
- } else {
- g_hash_table_insert (name_to_icon, icon->name, icon);
- }
+ icon = load_icon (icon_key, icon_name, size, TRUE);
+ g_hash_table_insert (name_to_icon, icon->name, icon);
}
if ((pixbuf = icon->pixbuf)) {