aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Terry <mike@mterry.name>2011-01-13 17:48:53 -0600
committerMichael Terry <mike@mterry.name>2011-01-13 17:48:53 -0600
commit0e9f42a12daf9bc3f14f6dd7dcc7efb33a22fa94 (patch)
tree26898bc1a7ae8d449a1f229651a23692755528b1 /src
parent05980b6e31ad1c48e93fb8733a89815d244ba933 (diff)
downloadlibayatana-appindicator-0e9f42a12daf9bc3f14f6dd7dcc7efb33a22fa94.tar.gz
libayatana-appindicator-0e9f42a12daf9bc3f14f6dd7dcc7efb33a22fa94.tar.bz2
libayatana-appindicator-0e9f42a12daf9bc3f14f6dd7dcc7efb33a22fa94.zip
aw shucks, do the required properties too, defensively
Diffstat (limited to 'src')
-rw-r--r--src/app-indicator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/app-indicator.c b/src/app-indicator.c
index d7e040c..40959bf 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -909,17 +909,17 @@ bus_get_prop (GDBusConnection * connection, const gchar * sender, const gchar *
AppIndicatorPrivate *priv = app->priv;
if (g_strcmp0(property, "Id") == 0) {
- return g_variant_new_string(app->priv->id);
+ return g_variant_new_string(app->priv->id ? app->priv->id : "");
} else if (g_strcmp0(property, "Category") == 0) {
GEnumValue *enum_value;
enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (APP_INDICATOR_TYPE_INDICATOR_CATEGORY), priv->category);
- return g_variant_new_string(enum_value->value_nick);
+ return g_variant_new_string(enum_value->value_nick ? enum_value->value_nick : "");
} else if (g_strcmp0(property, "Status") == 0) {
GEnumValue *enum_value;
enum_value = g_enum_get_value ((GEnumClass *) g_type_class_ref (APP_INDICATOR_TYPE_INDICATOR_STATUS), priv->status);
- return g_variant_new_string(enum_value->value_nick);
+ return g_variant_new_string(enum_value->value_nick ? enum_value->value_nick : "");
} else if (g_strcmp0(property, "IconName") == 0) {
- return g_variant_new_string(priv->icon_name);
+ return g_variant_new_string(priv->icon_name ? priv->icon_name : "");
} else if (g_strcmp0(property, "AttentionIconName") == 0) {
return g_variant_new_string(priv->attention_icon_name ? priv->attention_icon_name : "");
} else if (g_strcmp0(property, "IconThemePath") == 0) {