From 1ff31661d88adcc062630f760535146f2281209d Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Tue, 16 Oct 2001 20:56:21 +0000 Subject: Always explicitly clear out the SearchInfo. 2001-10-16 Jon Trowbridge * e-searching-tokenizer.c (e_searching_tokenizer_begin): Always explicitly clear out the SearchInfo. svn path=/trunk/; revision=13704 --- mail/ChangeLog | 5 +++++ mail/e-searching-tokenizer.c | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 74ef4d4191..3573ccacf7 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2001-10-16 Jon Trowbridge + + * e-searching-tokenizer.c (e_searching_tokenizer_begin): Always + explicitly clear out the SearchInfo. + 2001-10-16 * mail-folder-cache.c: Added an async_event handler to store_info. diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c index e33d8fe149..4100d707e2 100644 --- a/mail/e-searching-tokenizer.c +++ b/mail/e-searching-tokenizer.c @@ -847,13 +847,16 @@ e_searching_tokenizer_begin (HTMLTokenizer *t, gchar *content_type) ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (t); SearchInfo *si; - if (st->priv->search == NULL && st->priv->shared && (st->priv->shared->str_primary || st->priv->shared->str_secondary)) { + /* Reset our search */ + search_info_free (st->priv->search); + st->priv->search = NULL; + + if (st->priv->shared && (st->priv->shared->str_primary || st->priv->shared->str_secondary)) { st->priv->search = search_info_new (); } si = st->priv->search; - - if (st->priv->shared) { + if (st->priv->shared && si) { if (st->priv->shared->str_primary) { search_info_set_string (si, st->priv->shared->str_primary); @@ -889,7 +892,8 @@ e_searching_tokenizer_begin (HTMLTokenizer *t, gchar *content_type) static void e_searching_tokenizer_end (HTMLTokenizer *t) { - e_searching_tokenizer_cleanup (E_SEARCHING_TOKENIZER (t)); + ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (t); + e_searching_tokenizer_cleanup (st); HTML_TOKENIZER_CLASS (parent_class)->end (t); } -- cgit