From d7c605611eb73dbccfcc7a87d43bf27232f39661 Mon Sep 17 00:00:00 2001 From: guyzmo Date: Tue, 14 Feb 2017 15:49:32 +0100 Subject: [PATCH] Fixes missing failure return of notmuch msg open (#401) When calling the mx_ops->open_msg() method of the notmuch implementation, if the message failed to open, it is not reported to the user interface. This patch returns a non-zero value that will prevent a crash. fixes #308 Signed-off-by: Pietro Cerutti Signed-off-by: Guyzmo --- mutt_notmuch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mutt_notmuch.c b/mutt_notmuch.c index aa6bafe8d..ba252da88 100644 --- a/mutt_notmuch.c +++ b/mutt_notmuch.c @@ -2430,7 +2430,7 @@ static int nm_open_message(CONTEXT *ctx, MESSAGE *msg, int msgno) msg->fp = maildir_open_find_message(folder, cur->path, NULL); mutt_debug (1, "%s\n", __func__); - return 0; + return !msg->fp; } static int nm_close_message(CONTEXT *ctx, MESSAGE *msg) -- 2.50.1