]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid assertion violations in close_infile_unwind
authorEli Zaretskii <eliz@gnu.org>
Wed, 12 Jul 2017 14:49:21 +0000 (17:49 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 12 Jul 2017 14:49:21 +0000 (17:49 +0300)
* src/lread.c (close_infile_unwind): A temporary band-aid solution
for bug#27642: allow 'infile' be NULL.

src/lread.c

index 4d1a27d1c1db81e073bbbbd2e88eb3c31a2122bc..fe5de38267723e80dcbe3a38043bf5cfe67f96b2 100644 (file)
@@ -1066,7 +1066,7 @@ static void
 close_infile_unwind (void *arg)
 {
   FILE *stream = arg;
-  eassert (infile->stream == stream);
+  eassert (infile == NULL || infile->stream == stream);
   infile = NULL;
   fclose (stream);
 }