diff options
| author | Peter LaFosse <peter@vector35.com> | 2024-01-02 13:21:11 -0500 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2024-01-12 09:12:17 -0500 |
| commit | ef6727ef3cf0a735dde187e6fcb5be7e1c084387 (patch) | |
| tree | 1949aa294aa18045d6a591cd61933529a1cbf098 /python/types.py | |
| parent | 3ac99aa88c7019c8313304ef74dd5bbb468a74bc (diff) | |
Add some helpers for reading guid/uuids
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 |
