[dovecot-cvs] dovecot/src/lib-index/maildir maildir-rebuild.c,1.11,1.12

cras at procontrol.fi cras at procontrol.fi
Wed Apr 16 19:38:13 EEST 2003


Update of /home/cvs/dovecot/src/lib-index/maildir
In directory danu:/tmp/cvs-serv30052/lib-index/maildir

Modified Files:
	maildir-rebuild.c 
Log Message:
Don't crash if there's tree file hasn't been opened yet.



Index: maildir-rebuild.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/maildir/maildir-rebuild.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- maildir-rebuild.c	16 Apr 2003 15:13:24 -0000	1.11
+++ maildir-rebuild.c	16 Apr 2003 15:38:11 -0000	1.12
@@ -36,8 +36,10 @@
 	if (!mail_index_data_reset(index->data))
 		return FALSE;
 
-	if (!mail_tree_reset(index->tree))
-		return FALSE;
+	if (index->tree != NULL) {
+		if (!mail_tree_reset(index->tree))
+			return FALSE;
+	}
 
 	/* read the mails by syncing */
 	if (!index->sync_and_lock(index, MAIL_LOCK_UNLOCK, NULL))




More information about the dovecot-cvs mailing list