summaryrefslogtreecommitdiff
path: root/python/types.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2024-01-02 13:21:11 -0500
committerPeter LaFosse <peter@vector35.com>2024-01-12 09:12:17 -0500
commitef6727ef3cf0a735dde187e6fcb5be7e1c084387 (patch)
tree1949aa294aa18045d6a591cd61933529a1cbf098 /python/types.py
parent3ac99aa88c7019c8313304ef74dd5bbb468a74bc (diff)
Add some helpers for reading guid/uuids
Diffstat (limited to 'python/types.py')
-rw-r--r--python/types.py2
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