[gnome-power-manager/gnome-2-26] Never return NULL from gpm_devicekit_get_object_icon()
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-power-manager/gnome-2-26] Never return NULL from gpm_devicekit_get_object_icon()
- Date: Mon, 3 Aug 2009 16:20:08 +0000 (UTC)
commit 8604294e507d0781452d3f58f068ed1269abdb3f
Author: Richard Hughes <richard hughsie com>
Date: Mon Jun 15 10:20:12 2009 +0100
Never return NULL from gpm_devicekit_get_object_icon()
src/gpm-devicekit.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gpm-devicekit.c b/src/gpm-devicekit.c
index 9d40657..a096c2a 100644
--- a/src/gpm-devicekit.c
+++ b/src/gpm-devicekit.c
@@ -136,6 +136,13 @@ gpm_devicekit_get_object_icon (const DkpObject *obj)
filename = g_strdup_printf ("gpm-%s-%s", prefix, index_str);
}
}
+
+ /* nothing matched */
+ if (filename == NULL) {
+ egg_warning ("nothing matched, falling back to default icon");
+ filename = g_strdup ("dialog-warning");
+ }
+
egg_debug ("got filename: %s", filename);
return filename;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]