aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/mbox/camel-mbox-summary.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/mbox/camel-mbox-summary.c')
-rw-r--r--camel/providers/mbox/camel-mbox-summary.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/camel/providers/mbox/camel-mbox-summary.c b/camel/providers/mbox/camel-mbox-summary.c
index 18d889ee84..c037b6000e 100644
--- a/camel/providers/mbox/camel-mbox-summary.c
+++ b/camel/providers/mbox/camel-mbox-summary.c
@@ -228,10 +228,10 @@ message_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
mbi->frompos = camel_mime_parser_tell_start_from(mp);
/* do we want to index this message as we add it, as well? */
- if (mbs->index_force
- || (mi->flags & CAMEL_MESSAGE_FOLDER_FLAGGED) != 0
- || !ibex_contains_name(mbs->index, mi->uid)) {
-
+ if (mbs->index
+ && (mbs->index_force
+ || (mi->flags & CAMEL_MESSAGE_FOLDER_FLAGGED) != 0
+ || !ibex_contains_name(mbs->index, mi->uid))) {
camel_folder_summary_set_index(s, mbs->index);
} else {
camel_folder_summary_set_index(s, NULL);
@@ -387,7 +387,7 @@ camel_mbox_summary_load(CamelMboxSummary *mbs, int forceindex)
for (i = 0; i < camel_folder_summary_count(s); i++) {
CamelMessageInfo *mi = camel_folder_summary_index(s, i);
- if (!ibex_contains_name(mbs->index, mi->uid)) {
+ if (mbs->index && !ibex_contains_name(mbs->index, mi->uid)) {
minstart = ((CamelMboxMessageInfo *) mi)->frompos;
printf("Found unindexed message: %s\n", mi->uid);
break;