diff options
Diffstat (limited to 'src/wasm-ast-checker.c')
-rw-r--r-- | src/wasm-ast-checker.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |