From ef6727ef3cf0a735dde187e6fcb5be7e1c084387 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Tue, 2 Jan 2024 13:21:11 -0500 Subject: Add some helpers for reading guid/uuids --- python/types.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python/types.py') 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 -- cgit v1.3.1