diff options
-rw-r--r-- | mail/escape.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mail/escape.c b/mail/escape.c index 8675ec847..7733ec513 100644 --- a/mail/escape.c +++ b/mail/escape.c | |||
@@ -289,15 +289,18 @@ int | |||
289 | escape_deadletter (int argc MU_ARG_UNUSED, char **argv MU_ARG_UNUSED, | 289 | escape_deadletter (int argc MU_ARG_UNUSED, char **argv MU_ARG_UNUSED, |
290 | compose_env_t *env MU_ARG_UNUSED) | 290 | compose_env_t *env MU_ARG_UNUSED) |
291 | { | 291 | { |
292 | FILE *dead = fopen (getenv ("DEAD"), "r"); | 292 | FILE *dead = fopen (getenv ("DEAD"), "r"); |
293 | int c; | 293 | int c; |
294 | 294 | ||
295 | while ((c = fgetc (dead)) != EOF) | 295 | if (dead) |
296 | fputc (c, ofile); | 296 | { |
297 | fclose (dead); | 297 | while ((c = fgetc (dead)) != EOF) |
298 | fputc (c, ofile); | ||
299 | fclose (dead); | ||
300 | } | ||
298 | return 0; | 301 | return 0; |
299 | } | 302 | } |
300 | 303 | ||
301 | static int | 304 | static int |
302 | run_editor (char *ed, char *arg) | 305 | run_editor (char *ed, char *arg) |
303 | { | 306 | { |