Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/binaryen-c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1685,8 +1685,10 @@ BinaryenExpressionRef BinaryenTableGrow(BinaryenModuleRef module,
BinaryenExpressionRef value,
BinaryenExpressionRef delta) {
if (value == nullptr) {
auto tableType = (*(Module*)module).getTableOrNull(name)->type;
value = BinaryenRefNull(module, (BinaryenType)tableType.getID());
auto* table = (*(Module*)module).getTableOrNull(name);
if (table) {
value = BinaryenRefNull(module, (BinaryenType)table->type.getID());
}
}
return static_cast<Expression*>(
Builder(*(Module*)module)
Expand Down
Loading