From 6631584e8038f61aec9ade9c27140eec5e85078e Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 15 Feb 2025 20:43:22 +0200 Subject: [PATCH] imap: Fix crash with Maildir when trying to send INPROGRESS during mailbox syncing Mailbox syncing could have been done outside command context, in which case there is no global event. --- src/imap/imap-storage-callbacks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imap/imap-storage-callbacks.c b/src/imap/imap-storage-callbacks.c index 7cd31007ff..ad741fb83c 100644 --- a/src/imap/imap-storage-callbacks.c +++ b/src/imap/imap-storage-callbacks.c @@ -44,7 +44,7 @@ static void notify_no(struct mailbox *mailbox ATTR_UNUSED, static const char *find_cmd_tag(struct event *event) { - const struct event_field *field = + const struct event_field *field = event == NULL ? NULL : event_find_field_recursive(event, "cmd_tag"); return field != NULL && field->value_type == EVENT_FIELD_VALUE_TYPE_STR ? field->value.str : NULL; -- 2.47.3