From 7aeb5ac87c6105bd8fcc9b1fd12e37ba1550f587 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Mon, 19 Jun 2017 14:38:43 -0500 Subject: Import Upstream version 0.4.2.2 --- iconcache.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'iconcache.c') diff --git a/iconcache.c b/iconcache.c index fbd0dd84..49325e39 100644 --- a/iconcache.c +++ b/iconcache.c @@ -39,12 +39,13 @@ GdkPixbuf *icon_cache_get_pixbuf(const gchar * file) icon = g_hash_table_lookup(cache, file); if (!icon) { - icon = - gdk_pixbuf_new_from_file(idle_free - (g_build_filename - (params.path_data, "pixmaps", file, - NULL)), NULL); + gchar *path; + + path = g_build_filename(params.path_data, "pixmaps", file, NULL); + icon = gdk_pixbuf_new_from_file(path, NULL); g_hash_table_insert(cache, g_strdup(file), icon); + + g_free(path); } g_object_ref(icon); @@ -71,13 +72,13 @@ GdkPixbuf *icon_cache_get_pixbuf_at_size(const gchar * file, gint wid, icon = g_hash_table_lookup(cache, file); if (!icon) { - icon = - gdk_pixbuf_new_from_file_at_size(idle_free - (g_build_filename - (params.path_data, "pixmaps", - file, NULL)), wid, hei, - NULL); + gchar *path; + + path = g_build_filename(params.path_data, "pixmaps", file, NULL); + icon = gdk_pixbuf_new_from_file_at_size(path, wid, hei, NULL); g_hash_table_insert(cache, g_strdup(file), icon); + + g_free(path); } g_object_ref(icon); -- cgit v1.2.3