changeset 5147:6b0032df7008 HEAD

If trash mailbox can't be opened, don't crash.
author Timo Sirainen <tss@iki.fi>
date Fri, 16 Feb 2007 14:15:28 +0200
parents 7cf93253317d
children 7f2c39d7a2cc
files src/plugins/trash/trash-plugin.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/trash/trash-plugin.c	Fri Feb 16 14:08:32 2007 +0200
+++ b/src/plugins/trash/trash-plugin.c	Fri Feb 16 14:15:28 2007 +0200
@@ -53,6 +53,9 @@
 {
 	trash->box = mailbox_open(trash->storage, trash->name, NULL,
 				  MAILBOX_OPEN_KEEP_RECENT);
+	if (trash->box == NULL)
+		return -1;
+
 	if (sync_mailbox(trash->box) < 0)
 		return -1;