]> granicus.if.org Git - neomutt/commitdiff
check for Context
authorRichard Russon <rich@flatcap.org>
Sun, 25 Nov 2018 22:28:55 +0000 (22:28 +0000)
committerRichard Russon <rich@flatcap.org>
Sun, 25 Nov 2018 22:29:21 +0000 (22:29 +0000)
index.c

diff --git a/index.c b/index.c
index ee546355597d343899d0317d61c9e6b35e9f231e..ba2a65ea20b28d65ab795ee5f110dd0d38c9a5e0 100644 (file)
--- a/index.c
+++ b/index.c
@@ -2083,6 +2083,7 @@ int mutt_index_menu(void)
         break;
 
       case OP_MAIN_WINDOWED_VFOLDER_BACKWARD:
+        CHECK_IN_MAILBOX;
         mutt_debug(2, "OP_MAIN_WINDOWED_VFOLDER_BACKWARD\n");
         if (NmQueryWindowDuration <= 0)
         {
@@ -2103,6 +2104,7 @@ int mutt_index_menu(void)
         break;
 
       case OP_MAIN_WINDOWED_VFOLDER_FORWARD:
+      CHECK_IN_MAILBOX;
         if (NmQueryWindowDuration <= 0)
         {
           mutt_message(_("Windowed queries disabled"));
@@ -3013,7 +3015,8 @@ int mutt_index_menu(void)
       case OP_ENTER_COMMAND:
 
         mutt_enter_command();
-        mutt_check_rescore(Context->mailbox);
+        if (Context)
+          mutt_check_rescore(Context->mailbox);
         break;
 
       case OP_EDIT_OR_VIEW_RAW_MESSAGE: