aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook/e-destination.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/backend/ebook/e-destination.c')
-rw-r--r--addressbook/backend/ebook/e-destination.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/addressbook/backend/ebook/e-destination.c b/addressbook/backend/ebook/e-destination.c
index c652564442..3b7ad60189 100644
--- a/addressbook/backend/ebook/e-destination.c
+++ b/addressbook/backend/ebook/e-destination.c
@@ -206,7 +206,19 @@ e_destination_get_string (const EDestination *dest)
if (priv->card) {
priv->string = e_card_name_to_string (priv->card->name);
+ if (priv->string) {
+ g_strstrip (priv->string);
+ if (*(priv->string) == '\0') {
+ g_free (priv->string);
+ priv->string = NULL;
+ }
+ }
+
+ if (priv->string == NULL)
+ priv->string = g_strdup (e_destination_get_email (dest));
+ if (priv->string == NULL)
+ priv->string = g_strdup (_("???"));
}
}