diff --git a/core/iwasm/common/wasm_memory.c b/core/iwasm/common/wasm_memory.c index 019e0c12..ce7c30ac 100644 --- a/core/iwasm/common/wasm_memory.c +++ b/core/iwasm/common/wasm_memory.c @@ -104,6 +104,10 @@ static inline bool is_bounds_checks_enabled(WASMModuleInstanceCommon *module_inst) { #if WASM_CONFIGURABLE_BOUNDS_CHECKS != 0 + if (!module_inst) { + return true; + } + return wasm_runtime_is_bounds_checks_enabled(module_inst); #else return true;