summaryrefslogtreecommitdiff
path: root/src/passes/PostEmscripten.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/PostEmscripten.cpp')
-rw-r--r--src/passes/PostEmscripten.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/passes/PostEmscripten.cpp b/src/passes/PostEmscripten.cpp
index d57d849da..35e2b9a8b 100644
--- a/src/passes/PostEmscripten.cpp
+++ b/src/passes/PostEmscripten.cpp
@@ -61,13 +61,13 @@ struct PostEmscripten : public Pass {
hasInvokes = true;
}
}
- if (!hasInvokes) {
+ if (!hasInvokes || module->tables.empty()) {
return;
}
// Next, see if the Table is flat, which we need in order to see where
// invokes go statically. (In dynamic linking, the table is not flat,
// and we can't do this.)
- TableUtils::FlatTable flatTable(module->table);
+ TableUtils::FlatTable flatTable(*module->tables[0]);
if (!flatTable.valid) {
return;
}