Make sure that comp->priv->query_text isn't NULL. (Fixes bug #8195)
2001-08-29 Jon Trowbridge <trow@ximian.com> * gui/component/select-names/e-select-names-completion.c (book_query_score): Make sure that comp->priv->query_text isn't NULL. (Fixes bug #8195) svn path=/trunk/; revision=12524
This commit is contained in:
committed by
Jon Trowbridge
parent
e4c70cd2f5
commit
1cae0f1a15
@ -1,5 +1,9 @@
|
||||
2001-08-29 Jon Trowbridge <trow@ximian.com>
|
||||
|
||||
* gui/component/select-names/e-select-names-completion.c
|
||||
(book_query_score): Make sure that comp->priv->query_text isn't
|
||||
NULL. (Fixes bug #8195)
|
||||
|
||||
* backend/ebook/e-book-listener.c (e_book_listener_check_queue):
|
||||
This function can be re-entrant during the signal emission; Added
|
||||
extra ref/unrefs and checks to avoid problems if this happens.
|
||||
|
||||
@ -135,10 +135,12 @@ static ECompletionMatch *
|
||||
match_nickname (ESelectNamesCompletion *comp, EDestination *dest)
|
||||
{
|
||||
ECompletionMatch *match = NULL;
|
||||
gint len = strlen (comp->priv->query_text);
|
||||
gint len;
|
||||
ECard *card = e_destination_get_card (dest);
|
||||
double score;
|
||||
|
||||
len = strlen (comp->priv->query_text);
|
||||
|
||||
if (card->nickname
|
||||
&& !g_utf8_strncasecmp (comp->priv->query_text, card->nickname, len)) {
|
||||
ECompletionMatch *match = g_new0 (ECompletionMatch, 1);
|
||||
@ -555,9 +557,12 @@ book_query_score (ESelectNamesCompletion *comp, EDestination *dest)
|
||||
ECompletionMatch *best_match = NULL;
|
||||
gint i;
|
||||
|
||||
g_return_val_if_fail (comp && E_IS_SELECT_NAMES_COMPLETION (comp), NULL);
|
||||
g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
|
||||
g_return_val_if_fail (E_IS_SELECT_NAMES_COMPLETION (comp), NULL);
|
||||
g_return_val_if_fail (E_IS_DESTINATION (dest), NULL);
|
||||
|
||||
if (! (comp->priv->query_text && *comp->priv->query_text))
|
||||
return NULL;
|
||||
|
||||
for (i=0; i<book_query_count; ++i) {
|
||||
|
||||
ECompletionMatch *this_match = NULL;
|
||||
|
||||
Reference in New Issue
Block a user