]> granicus.if.org Git - mutt/commitdiff
Fix a segmentation fault when viewing message/rfc822 attachments
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 28 Dec 1998 14:59:04 +0000 (14:59 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 28 Dec 1998 14:59:04 +0000 (14:59 +0000)
from the compose screen.

attach.c

index c2b72aa1d58b4d37a793a81b0f51997060555bd5..a01fb762c6e511a5bca7d0036968a362e3dcd305 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -314,7 +314,7 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag)
   
   is_message = mutt_is_message_type(a->type, a->subtype);
 #ifdef _PGPPATH
-  if (is_message && (a->hdr->pgp & PGPENCRYPT) && !pgp_valid_passphrase())
+  if (is_message && a->hdr && (a->hdr->pgp & PGPENCRYPT) && !pgp_valid_passphrase())
     return (rc);
 #endif /* _PGPPATH */
   use_mailcap = (flag == M_MAILCAP ||