diff --git a/src/eval.c b/src/eval.c index 954cfe9..ac49051 100644 --- a/src/eval.c +++ b/src/eval.c @@ -146,6 +146,10 @@ apfl_ctx_new(void) void apfl_ctx_destroy(apfl_ctx ctx) { + if (ctx == NULL) { + return; + } + apfl_hashmap_destroy(ctx->scope); free(ctx); }