Don't run-boot-inits! if saved-boot-inits is unbound.
authorJoe Marshall <jmarshall@alum.mit.edu>
Tue, 24 Nov 2009 00:30:41 +0000 (16:30 -0800)
committerJoe Marshall <jmarshall@alum.mit.edu>
Tue, 24 Nov 2009 00:30:41 +0000 (16:30 -0800)
src/runtime/boot.scm

index 4a23baf03d34e943e1510b83e1ffe56de82056e9..8058705225cb691290fba7040c4cff2f205e5a7a 100644 (file)
@@ -158,11 +158,12 @@ USA.
     ((ucode-primitive local-assignment) environment saved-boot-inits inits)))
 
 (define (run-boot-inits! environment)
-  (let ((inits
-        ((ucode-primitive lexical-reference) environment saved-boot-inits)))
-    ((ucode-primitive unbind-variable) environment saved-boot-inits)
-    (for-each (lambda (init) (init))
-             inits)))
+  (and (not (lexical-unreferenceable? environment saved-boot-inits))
+       (let ((inits
+             ((ucode-primitive lexical-reference) environment saved-boot-inits)))
+        ((ucode-primitive unbind-variable) environment saved-boot-inits)
+        (for-each (lambda (init) (init))
+                  inits))))
 
 (define boot-inits #f)
 (define saved-boot-inits '|#[saved-boot-inits]|)
\ No newline at end of file