# HG changeset patch # User Kim F. Storm # Date 1121870435 0 # Node ID 0fa146cd9142b2239f237c1083afebc8a1618708 # Parent f151e7e7a4a84d1c5081514538e2266bd25cefad (load_unwind): Rework last change. diff -r f151e7e7a4a8 -r 0fa146cd9142 src/lread.c --- a/src/lread.c Wed Jul 20 14:39:35 2005 +0000 +++ b/src/lread.c Wed Jul 20 14:40:35 2005 +0000 @@ -953,12 +953,12 @@ } static Lisp_Object -load_unwind (stream) /* used as unwind-protect function in load */ - Lisp_Object stream; +load_unwind (arg) /* used as unwind-protect function in load */ + Lisp_Object arg; { - struct Lisp_Save_Value *p = XSAVE_VALUE (stream); - - fclose ((FILE *) p->pointer); + FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; + if (stream != NULL) + fclose (stream); if (--load_in_progress < 0) load_in_progress = 0; return Qnil; }