Rocco Rutte:
authorpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sat, 5 Mar 2005 14:14:20 +0000 (14:14 +0000)
committerpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sat, 5 Mar 2005 14:14:20 +0000 (14:14 +0000)
fix segfault for NNTP functions (reported by Andreas Kneib)

git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@142 e385b8ad-14ed-0310-8656-cc95a2468c6d

curs_main.c

index 23604af..28921a3 100644 (file)
@@ -2326,7 +2326,11 @@ CHECK_IMAP_ACL(IMAP_ACL_SEEN);
       case OP_FORWARD_TO_GROUP:
 
         CHECK_ATTACH;
       case OP_FORWARD_TO_GROUP:
 
         CHECK_ATTACH;
-        if (op != OP_FOLLOWUP || !CURHDR->env->followup_to ||
+        if ((op == OP_FOLLOWUP || op == OP_FORWARD_TO_GROUP) &&
+            Context && Context->msgcount == 0) {
+          mutt_error (_("There are no messages."));
+          sleep (2);
+        } else if (op != OP_FOLLOWUP || !CURHDR->env->followup_to ||
             mutt_strcasecmp (CURHDR->env->followup_to, "poster") ||
             query_quadoption (OPT_FOLLOWUPTOPOSTER,_("Reply by mail as poster prefers?")) != M_YES)
         {
             mutt_strcasecmp (CURHDR->env->followup_to, "poster") ||
             query_quadoption (OPT_FOLLOWUPTOPOSTER,_("Reply by mail as poster prefers?")) != M_YES)
         {