From b7c8e687b0bb1b94905b1a03d5a578736e226030 Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Wed, 25 Jul 2001 08:31:02 +0000 Subject: Properly dup the results of e_destination_get_email. 2001-07-25 Jon Trowbridge * backend/ebook/e-destination.c (e_destination_get_name): Properly dup the results of e_destination_get_email. * gui/component/select-names/e-select-names-popup.c (e_select_names_popup): Check that our destination isn't empty before building our popup. (Bug #5250) * backend/ebook/e-destination.c (e_destination_is_empty): Made argument const. svn path=/trunk/; revision=11395 --- addressbook/gui/component/select-names/e-select-names-popup.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'addressbook/gui/component/select-names') diff --git a/addressbook/gui/component/select-names/e-select-names-popup.c b/addressbook/gui/component/select-names/e-select-names-popup.c index aa668884c2..c4cb57533d 100644 --- a/addressbook/gui/component/select-names/e-select-names-popup.c +++ b/addressbook/gui/component/select-names/e-select-names-popup.c @@ -323,6 +323,8 @@ popup_menu_nocard (PopupInfo *info) memset (uiinfo, 0, sizeof (uiinfo)); str = e_destination_get_name (info->dest); + if (str == NULL) + str = _("Unnamed Contact"); uiinfo[i].type = GNOME_APP_UI_ITEM; uiinfo[i].label = (gchar *) str; @@ -373,6 +375,9 @@ e_select_names_popup (ESelectNamesModel *model, GdkEventButton *ev, gint pos) return; dest = e_select_names_model_get_destination (model, index); + if (e_destination_is_empty (dest)) + return; + card = e_destination_get_card (dest); info = popup_info_new (model, dest, pos, index); -- cgit v1.2.3