diff options
Diffstat (limited to 'iconcache.c')
-rw-r--r-- | iconcache.c | 10 |
1 files changed, 8 insertions, 2 deletions
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; } |