[gnome-power-manager] Never return NULL from gpm_devicekit_get_object_icon()
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-power-manager] Never return NULL from gpm_devicekit_get_object_icon()
- Date: Mon, 15 Jun 2009 05:21:46 -0400 (EDT)
commit 651cd63cfd5e1d47bd9c625a904d57e744284292
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 89a0c69..9e36f9b 100644
--- a/src/gpm-devicekit.c
+++ b/src/gpm-devicekit.c
@@ -155,6 +155,13 @@ gpm_devicekit_get_object_icon (DkpDevice *device)
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]