diff options
author | Not Zed <NotZed@Ximian.com> | 2003-03-07 11:38:45 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2003-03-07 11:38:45 +0800 |
commit | bc03ae066bee95dc986578f6891be3de39671c4e (patch) | |
tree | 7b106d73d34fbcaad7cce5c71cdc6298d9183a2b /camel | |
parent | 647671b6151f4e54c445ae93363a1f6136e1a88b (diff) | |
download | gsoc2013-evolution-bc03ae066bee95dc986578f6891be3de39671c4e.tar gsoc2013-evolution-bc03ae066bee95dc986578f6891be3de39671c4e.tar.gz gsoc2013-evolution-bc03ae066bee95dc986578f6891be3de39671c4e.tar.bz2 gsoc2013-evolution-bc03ae066bee95dc986578f6891be3de39671c4e.tar.lz gsoc2013-evolution-bc03ae066bee95dc986578f6891be3de39671c4e.tar.xz gsoc2013-evolution-bc03ae066bee95dc986578f6891be3de39671c4e.tar.zst gsoc2013-evolution-bc03ae066bee95dc986578f6891be3de39671c4e.zip |
handle a null return from search_by_expression, for bug #33786.
2003-03-07 Not Zed <NotZed@Ximian.com>
* camel-vee-folder.c (vee_search_by_expression): handle a null
return from search_by_expression, for bug #33786.
svn path=/trunk/; revision=20215
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | camel/camel-vee-folder.c | 21 |
2 files changed, 17 insertions, 9 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index d37731e83a..6af3c77a90 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2003-03-07 Not Zed <NotZed@Ximian.com> + + * camel-vee-folder.c (vee_search_by_expression): handle a null + return from search_by_expression, for bug #33786. + 2003-03-06 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-utils.c (imap_next_word): diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c index 82f9c7feb0..9422f77e19 100644 --- a/camel/camel-vee-folder.c +++ b/camel/camel-vee-folder.c @@ -686,16 +686,19 @@ vee_search_by_expression(CamelFolder *folder, const char *expression, CamelExcep /* make sure we only search each folder once - for unmatched folder to work right */ if (g_hash_table_lookup(searched, f) == NULL) { camel_vee_folder_hash_folder(f, hash); - matches = camel_folder_search_by_expression(f, expression, ex); - for (i = 0; i < matches->len; i++) { - char *uid = matches->pdata[i], *vuid; - - vuid = g_malloc(strlen(uid)+9); - memcpy(vuid, hash, 8); - strcpy(vuid+8, uid); - g_ptr_array_add(result, vuid); + /* FIXME: shouldn't ignore search exception */ + matches = camel_folder_search_by_expression(f, expression, NULL); + if (matches) { + for (i = 0; i < matches->len; i++) { + char *uid = matches->pdata[i], *vuid; + + vuid = g_malloc(strlen(uid)+9); + memcpy(vuid, hash, 8); + strcpy(vuid+8, uid); + g_ptr_array_add(result, vuid); + } + camel_folder_search_free(f, matches); } - camel_folder_search_free(f, matches); g_hash_table_insert(searched, f, f); } node = g_list_next(node); |