summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wasm-validator.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm-validator.h b/src/wasm-validator.h
index 3a9980860..49e2eb5d8 100644
--- a/src/wasm-validator.h
+++ b/src/wasm-validator.h
@@ -190,7 +190,7 @@ public:
// start
if (curr->start.is()) {
auto func = curr->checkFunction(curr->start);
- if (shouldBeTrue(func, curr->start, "start must be found")) {
+ if (shouldBeTrue(func != nullptr, curr->start, "start must be found")) {
shouldBeTrue(func->params.size() == 0, curr, "start must have 0 params");
shouldBeTrue(func->result == none, curr, "start must not return a value");
}