From fa599d79e8c51f884a2493776457f31a34e62a7a Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sat, 11 Jun 2011 16:49:51 +0900 Subject: [PATCH] adding type check --- lib/chibi/ast.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/chibi/ast.c b/lib/chibi/ast.c index 6b57b4bd..bf5213ae 100644 --- a/lib/chibi/ast.c +++ b/lib/chibi/ast.c @@ -36,7 +36,9 @@ static void sexp_define_accessors (sexp ctx, sexp env, sexp_uint_t ctype, } static sexp sexp_get_env_cell (sexp ctx sexp_api_params(self, n), sexp env, sexp id) { - sexp cell = sexp_env_cell(env, id, 0); + sexp cell; + sexp_assert_type(ctx, sexp_envp, SEXP_ENV, env); + cell = sexp_env_cell(env, id, 0); while ((! cell) && sexp_synclop(id)) { env = sexp_synclo_env(id); id = sexp_synclo_expr(id);