From 1dfda6573cc6e71e90ded040e421004146da1a2c Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Mon, 29 Oct 2001 21:31:25 +0000 Subject: Drop a match if either of the text fields is NULL. This could happen if 2001-10-29 Jon Trowbridge * 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 --- addressbook/ChangeLog | 8 ++++++++ .../gui/component/select-names/e-select-names-completion.c | 6 ++++++ 2 files changed, 14 insertions(+) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index d0d04d85ab..9a9b602d0d 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,10 @@ +2001-10-29 Jon Trowbridge + + * 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) + 2001-10-29 JP Rosevear * conduit/address-conduit.c (is_syncable): fix bug that allowed @@ -53,6 +60,7 @@ (field_activated): Stop editing on the activate signal and remove the focus from the text. Fixes Ximian bug #12286. +>>>>>>> 1.897 2001-10-28 JP Rosevear * conduit/address-conduit.h: tidy 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; -- cgit