aboutsummaryrefslogtreecommitdiff
path: root/src/app-indicator.c
diff options
context:
space:
mode:
authorMichael Terry <mike@mterry.name>2011-01-13 17:36:57 -0600
committerMichael Terry <mike@mterry.name>2011-01-13 17:36:57 -0600
commit05980b6e31ad1c48e93fb8733a89815d244ba933 (patch)
treeb40b58977656e60d3022881ae30eb76ca7a3f4d3 /src/app-indicator.c
parentb38d1d8a853bee2d08ce7ead3f0ffa00a6670cd6 (diff)
downloadlibayatana-appindicator-05980b6e31ad1c48e93fb8733a89815d244ba933.tar.gz
libayatana-appindicator-05980b6e31ad1c48e93fb8733a89815d244ba933.tar.bz2
libayatana-appindicator-05980b6e31ad1c48e93fb8733a89815d244ba933.zip
avoid nulls when crafting variants
Diffstat (limited to 'src/app-indicator.c')
-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 babdaf5..d7e040c 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -921,9 +921,9 @@ bus_get_prop (GDBusConnection * connection, const gchar * sender, const gchar *
} else if (g_strcmp0(property, "IconName") == 0) {
return g_variant_new_string(priv->icon_name);
} else if (g_strcmp0(property, "AttentionIconName") == 0) {
- return g_variant_new_string(priv->attention_icon_name);
+ return g_variant_new_string(priv->attention_icon_name ? priv->attention_icon_name : "");
} else if (g_strcmp0(property, "IconThemePath") == 0) {
- return g_variant_new_string(priv->icon_theme_path);
+ return g_variant_new_string(priv->icon_theme_path ? priv->icon_theme_path : "");
} else if (g_strcmp0(property, "Menu") == 0) {
if (priv->menuservice != NULL) {
GValue strval = { 0 };
@@ -936,9 +936,9 @@ bus_get_prop (GDBusConnection * connection, const gchar * sender, const gchar *
return g_variant_new("o", "/");
}
} else if (g_strcmp0(property, "XAyatanaLabel") == 0) {
- return g_variant_new_string(priv->label);
+ return g_variant_new_string(priv->label ? priv->label : "");
} else if (g_strcmp0(property, "XAyatanaLabelGuide") == 0) {
- return g_variant_new_string(priv->label_guide);
+ return g_variant_new_string(priv->label_guide ? priv->label_guide : "");
} else if (g_strcmp0(property, "XAyatanaOrderingIndex") == 0) {
return g_variant_new_uint32(priv->ordering_index);
}