summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-validator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r--src/wasm/wasm-validator.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index d8dba953f..951481dac 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -1437,12 +1437,7 @@ void FunctionValidator::visitDataDrop(DataDrop* curr) {
"Bulk memory operations require bulk memory [--enable-bulk-memory]");
shouldBeEqualOrFirstIsUnreachable(
curr->type, Type(Type::none), curr, "data.drop must have type none");
- if (!shouldBeFalse(getModule()->memories.empty(),
- curr,
- "Memory operations require a memory")) {
- return;
- }
- shouldBeTrue(getModule()->getDataSegment(curr->segment),
+ shouldBeTrue(getModule()->getDataSegmentOrNull(curr->segment),
curr,
"data.drop segment should exist");
}