X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/14c29200cb58d3c4a0830265f2433849781858d0..b106baa5728eb8efafc4a959da8806d34f5ebecb:/attach.c?ds=sidebyside diff --git a/attach.c b/attach.c index 8c3edf2..5acc17b 100644 --- a/attach.c +++ b/attach.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 1996-2000 Michael R. Elkins - * Copyright (C) 1999-2000 Thomas Roessler + * Copyright (C) 1996-2000,2002 Michael R. Elkins + * Copyright (C) 1999-2004,2006 Thomas Roessler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -561,10 +561,11 @@ int mutt_view_attachment (FILE *fp, BODY *a, int flag, HEADER *hdr, if ((mutt_wait_filter (thepid) || (entry->needsterminal && option (OPTWAITKEY))) && !use_pager) mutt_any_key_to_continue (NULL); - - close(tempfd); - close(pagerfd); - + + if (tempfd != -1) + close (tempfd); + if (pagerfd != -1) + close (pagerfd); } else {