diff options
-rw-r--r-- | src/runtime.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime.js b/src/runtime.js index 5b09a16b..730bf2ec 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -180,6 +180,7 @@ Runtime = { type = typeof Types === 'undefined' ? Runtime.typeInfo[typeName] : Types.types[typeName]; if (!type) return null; if (!struct) struct = Types.structMetadata[typeName.replace(/.*\./, '')]; + if (!struct) return null; assert(type.fields.length === struct.length, 'Number of named fields must match the type for ' + typeName); alignment = type.flatIndexes; } else { |