diff options
Diffstat (limited to 'python/types.py')
| -rw-r--r-- | python/types.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/types.py b/python/types.py index 53454a17..57c0824c 100644 --- a/python/types.py +++ b/python/types.py @@ -1227,6 +1227,8 @@ class BaseStructure: def __init__(self, type: Union['NamedTypeReferenceType', 'StructureType'], offset: int, width: int = 0): if isinstance(type, StructureType): + if type.registered_name is None: + raise ValueError("StructureType must be registered to be used as a base structure") self.type = type.registered_name self.offset = offset self.width = type.width |
