aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/select-names
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-10-30 05:31:25 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-10-30 05:31:25 +0800
commit1dfda6573cc6e71e90ded040e421004146da1a2c (patch)
tree0be6c0e3cb876241b394c0d964043409af85cc1f /addressbook/gui/component/select-names
parent75cd5e1f3d3e898cceda5e8fb84ca8140843258d (diff)
downloadgsoc2013-evolution-1dfda6573cc6e71e90ded040e421004146da1a2c.tar
gsoc2013-evolution-1dfda6573cc6e71e90ded040e421004146da1a2c.tar.gz
gsoc2013-evolution-1dfda6573cc6e71e90ded040e421004146da1a2c.tar.bz2
gsoc2013-evolution-1dfda6573cc6e71e90ded040e421004146da1a2c.tar.lz
gsoc2013-evolution-1dfda6573cc6e71e90ded040e421004146da1a2c.tar.xz
gsoc2013-evolution-1dfda6573cc6e71e90ded040e421004146da1a2c.tar.zst
gsoc2013-evolution-1dfda6573cc6e71e90ded040e421004146da1a2c.zip
Drop a match if either of the text fields is NULL. This could happen if
2001-10-29 Jon Trowbridge <trow@ximian.com> * gui/component/select-names/e-select-names-completion.c (make_match): Drop a match if either of the text fields is NULL. This could happen if any of the utf-8 involved is invalid, for example. (Bug #13757) svn path=/trunk/; revision=14365
Diffstat (limited to 'addressbook/gui/component/select-names')
-rw-r--r--addressbook/gui/component/select-names/e-select-names-completion.c6
1 files changed, 6 insertions, 0 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 1899662dda..ff1b06ccbf 100644
--- a/addressbook/gui/component/select-names/e-select-names-completion.c
+++ b/addressbook/gui/component/select-names/e-select-names-completion.c
@@ -116,6 +116,12 @@ make_match (EDestination *dest, const gchar *menu_form, double score)
e_completion_match_set_text (match, e_destination_get_name (dest), menu_form);
+ /* Reject any match that has null text fields. */
+ if (! (e_completion_match_get_match_text (match) && e_completion_match_get_menu_text (match))) {
+ gtk_object_unref (GTK_OBJECT (match));
+ return NULL;
+ }
+
/* Since we sort low to high, we negate so that larger use scores will come first */
match->sort_major = card ? -floor (e_card_get_use_score (card)) : 0;