From ee6c3f9b4cf08a276c971dee66e1acdb32b3dff9 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Mon, 19 Jun 2017 14:38:44 -0500 Subject: Import Upstream version 0.4.2.3 --- iconcache.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'iconcache.c') diff --git a/iconcache.c b/iconcache.c index 49325e39..ed7ce209 100644 --- a/iconcache.c +++ b/iconcache.c @@ -26,6 +26,8 @@ void icon_cache_init(void) DEBUG("initializing icon cache"); if (!cache) { cache = g_hash_table_new(g_str_hash, g_str_equal); + } else { + DEBUG("already initialized? huh?"); } } @@ -48,7 +50,9 @@ GdkPixbuf *icon_cache_get_pixbuf(const gchar * file) g_free(path); } - g_object_ref(icon); + if (icon) { + g_object_ref(icon); + } return icon; } @@ -81,7 +85,9 @@ GdkPixbuf *icon_cache_get_pixbuf_at_size(const gchar * file, gint wid, g_free(path); } - g_object_ref(icon); + if (icon) { + g_object_ref(icon); + } return icon; } -- cgit v1.2.3