From 6f7ec6c07dfe9c01977cf685832871c45d7e2b17 Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Mon, 30 Jul 2001 21:06:45 +0000 Subject: Properly handle the case where our "cleaned" completion is the empty 2001-07-30 Jon Trowbridge * gui/component/select-names/e-select-names-completion.c (e_select_names_completion_do_query): Properly handle the case where our "cleaned" completion is the empty string. This happens, for example, if the query text is the string "\"". (Bug #5610). * backend/ebook/e-destination.c (e_destination_get_address_textv): Reassure fejj that I'm not doing something stupid here. (e_destination_get_address): Fix address quoting. This is a stop-gap measure until I can change this code to use Camel's superior address-handling routines. (Also Bug #5610) svn path=/trunk/; revision=11487 --- .../gui/component/select-names/e-select-names-completion.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'addressbook/gui') 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 e75f964b4c..1d1cde2489 100644 --- a/addressbook/gui/component/select-names/e-select-names-completion.c +++ b/addressbook/gui/component/select-names/e-select-names-completion.c @@ -926,6 +926,7 @@ e_select_names_completion_start_query (ESelectNamesCompletion *comp, const gchar } else { g_free (comp->priv->query_text); + comp->priv->query_text = NULL; } g_free (sexp); @@ -945,8 +946,14 @@ e_select_names_completion_do_query (ESelectNamesCompletion *comp, const gchar *q g_return_if_fail (comp != NULL); g_return_if_fail (E_IS_SELECT_NAMES_COMPLETION (comp)); - query_is_still_running = comp->priv->book_view_tag || comp->priv->book_view; clean = clean_query_text (query_text); + if (! (clean && *clean)) { + g_free (clean); + e_completion_end_search (E_COMPLETION (comp)); + return; + } + + query_is_still_running = comp->priv->book_view_tag || comp->priv->book_view; if (out) { fprintf (out, "do_query: %s => %s\n", query_text, clean); -- cgit v1.2.3