aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/iconcache.c
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2007-07-27 16:09:36 +0000
committerLeandro A. F. Pereira <leandro@hardinfo.org>2007-07-27 16:09:36 +0000
commit422425593df585b879ca45b19849da48be463fe5 (patch)
tree2005cf9496ec141337804f13312e7fee54199e6b /hardinfo2/iconcache.c
parentc6b3b5c9908158d490150f19a040e4b186949bc3 (diff)
Fix crashes, add Puppy Linux as a recognized distribution.
Diffstat (limited to 'hardinfo2/iconcache.c')
-rw-r--r--hardinfo2/iconcache.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/hardinfo2/iconcache.c b/hardinfo2/iconcache.c
index 49325e39..af4f98c0 100644
--- a/hardinfo2/iconcache.c
+++ b/hardinfo2/iconcache.c
@@ -48,7 +48,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 +83,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;
}