aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-12 21:23:35 -0600
committerTed Gould <ted@gould.cx>2010-03-12 21:23:35 -0600
commit70a0dc7cf431dd2c7d4faa7081cbd7ea637a825f (patch)
tree31bd5764b5b860f18ae1aa54f5f72d5f230ec5e9
parent4045ff049580248fdffa58a3b8c40bf4bef07682 (diff)
downloadayatana-indicator-session-70a0dc7cf431dd2c7d4faa7081cbd7ea637a825f.tar.gz
ayatana-indicator-session-70a0dc7cf431dd2c7d4faa7081cbd7ea637a825f.tar.bz2
ayatana-indicator-session-70a0dc7cf431dd2c7d4faa7081cbd7ea637a825f.zip
Making sure that if we can't get the icon, we leave it alone.
-rw-r--r--src/indicator-session.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/indicator-session.c b/src/indicator-session.c
index 184a335..55579b9 100644
--- a/src/indicator-session.c
+++ b/src/indicator-session.c
@@ -167,6 +167,14 @@ indicator_session_finalize (GObject *object)
static void
icon_name_get_cb (DBusGProxy *proxy, char * OUT_name, GError *error, gpointer userdata)
{
+ if (error != NULL) {
+ return;
+ }
+
+ if (OUT_name == NULL || OUT_name[0] == '\0') {
+ return;
+ }
+
IndicatorSession * self = INDICATOR_SESSION(userdata);
gtk_image_set_from_icon_name(self->status_image, OUT_name, GTK_ICON_SIZE_MENU);
return;