]> granicus.if.org Git - neomutt/commitdiff
fix segfault when exiting with 'x' key
authorJan Synacek <jsynacek@redhat.com>
Thu, 29 Mar 2012 08:59:23 +0000 (10:59 +0200)
committerRichard Russon <rich@flatcap.org>
Mon, 14 Mar 2016 23:11:41 +0000 (23:11 +0000)
curs_main.c

index 7805b029dc84a8b845ce0e1350cc31d0afe512c4..3e15dd95ee7cdde79dc03ce9010d229d32719df2 100644 (file)
@@ -973,7 +973,10 @@ int mutt_index_menu (void)
       mutt_curs_set (1);       /* fallback from the pager */
     }
 
-    nm_debug_check(Context);
+    if (Context)
+    {
+      nm_debug_check(Context);
+    }
 
     switch (op)
     {
@@ -2597,7 +2600,11 @@ int mutt_index_menu (void)
          km_error_key (MENU_MAIN);
     }
 
-    nm_debug_check(Context);
+    if (Context)
+    {
+      nm_debug_check(Context);
+    }
+
 
     if (menu->menu == MENU_PAGER)
     {