find_binding_cell: no bindings in a null environment
authorMatt Birkholz <matt@birchwood-abbey.net>
Tue, 23 Oct 2018 18:39:51 +0000 (11:39 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Tue, 23 Oct 2018 18:39:51 +0000 (11:39 -0700)
No need to fail an assert during test-library-loader neither.

src/microcode/lookup.c

index 78fb1834509b01f95b2b4f72e8f0460620c849d9..d4f2b644818c62816919b9a04e6c5a2a625aea32 100644 (file)
@@ -1204,6 +1204,8 @@ static SCHEME_OBJECT *
 find_binding_cell (SCHEME_OBJECT environment, SCHEME_OBJECT symbol,
                   SCHEME_OBJECT * frame_ret)
 {
+  if (NULL_FRAME_P (environment))
+    return (0);
   assert (ENVIRONMENT_P (environment));
   SCHEME_OBJECT frame = environment;
   while (1)