From: Timo Sirainen Date: Sat, 15 Feb 2025 18:43:22 +0000 (+0200) Subject: imap: Fix crash with Maildir when trying to send INPROGRESS during mailbox syncing X-Git-Tag: 2.4.1~195 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6631584e8038f61aec9ade9c27140eec5e85078e;p=thirdparty%2Fdovecot%2Fcore.git 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. --- 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;