aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r--addressbook/gui/component/select-names/e-select-names-completion.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names-completion.c b/addressbook/gui/component/select-names/e-select-names-completion.c
index 17f4e0e790..88ab176bf6 100644
--- a/addressbook/gui/component/select-names/e-select-names-completion.c
+++ b/addressbook/gui/component/select-names/e-select-names-completion.c
@@ -139,7 +139,10 @@ match_email (ESelectNamesCompletion *comp, EDestination *dest, double *score)
gchar *name, *str;
*score = len * 2; /* 2 points for each matching character */
name = e_card_name_to_string (card->name);
- str = g_strdup_printf ("<%s> %s", email, name);
+ if (name && *name)
+ str = g_strdup_printf ("<%s> %s", email, name);
+ else
+ str = g_strdup (email);
g_free (name);
return str;
}