diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-11-19 14:52:38 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-11-19 14:52:38 +0000 |
commit | 8708504c28caeee4bd3e95b6b6d739970863f19c (patch) | |
tree | ede48c1cf75ce7c38ffd75a5fd4eba11a0bb1020 /hardinfo2/iconcache.c | |
parent | f128a3b3f241c7280339a2be8f3e6c18295bb526 (diff) |
Started working on report generation without GUI.
Diffstat (limited to 'hardinfo2/iconcache.c')
-rw-r--r-- | hardinfo2/iconcache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hardinfo2/iconcache.c b/hardinfo2/iconcache.c index 55e98e14..9cb5a035 100644 --- a/hardinfo2/iconcache.c +++ b/hardinfo2/iconcache.c @@ -32,6 +32,8 @@ GdkPixbuf *icon_cache_get_pixbuf(const gchar *file) { GdkPixbuf *icon; + if (!cache) icon_cache_init(); + icon = g_hash_table_lookup(cache, file); if (!icon) { @@ -48,7 +50,7 @@ GdkPixbuf *icon_cache_get_pixbuf(const gchar *file) GtkWidget *icon_cache_get_image(const gchar *file) { GdkPixbuf *icon; - + icon = icon_cache_get_pixbuf(file); return gtk_image_new_from_pixbuf(icon); } @@ -57,6 +59,8 @@ GdkPixbuf *icon_cache_get_pixbuf_at_size(const gchar *file, gint wid, gint hei) { GdkPixbuf *icon; + if (!cache) icon_cache_init(); + icon = g_hash_table_lookup(cache, file); if (!icon) { |