| Index: compiled/bindings.ipp |
| =================================================================== |
| --- a/compiled/bindings.ipp |
| +++ b/compiled/bindings.ipp |
| @@ -485,16 +485,18 @@ namespace bindings_internal |
| result += " var type = HEAP32[result + " + std::to_string(offset)+ " >> 2];\n"; |
| result += " if (type in " + cls.name + "_mapping)\n"; |
| result += " result = new (exports[" + cls.name + "_mapping[type]])(result);\n"; |
| result += " else\n"; |
| result += " throw new Error('Unexpected " + cls.name + " type: ' + type);\n"; |
| } |
| result += " }\n"; |
| + result += " else\n"; |
| + result += " result = null;\n"; |
| return result; |
| } |
| default: |
| throw std::runtime_error("Unexpected return type for " + std::string(call.name)); |
| } |
| } |
| const std::string wrapCall(const FunctionInfo& call) |