From b4d2bc2f3fe925a78a7e1ea061106b1f01e8dba2 Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Thu, 22 Sep 2016 17:39:20 -0700 Subject: parse tests for {im,ex}porting tables, etc. --- src/wasm-ast-checker.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/wasm-ast-checker.c') diff --git a/src/wasm-ast-checker.c b/src/wasm-ast-checker.c index fe3a159b..0595ca18 100644 --- a/src/wasm-ast-checker.c +++ b/src/wasm-ast-checker.c @@ -950,6 +950,8 @@ static void check_global(Context* ctx, static const char s_desc[] = "global initializer expression"; WasmType type = WASM_TYPE_VOID; WasmExpr* expr = global->init_expr; + if (!expr) + return; if (expr->next != NULL) { print_const_expr_error(ctx, loc, s_desc); -- cgit v1.2.3