diff options
| author | Peter LaFosse <peter@vector35.com> | 2022-03-28 11:30:29 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2022-03-28 12:28:32 -0400 |
| commit | 8d66fde3c6a03e8c0509661cdaee5f0f55869f3d (patch) | |
| tree | 6e8e273c0ca319caf96d48c9059073488d1f23d6 /python/typelibrary.py | |
| parent | fa7f6139b16c10d63351c64c981c000c9828b640 (diff) | |
Ensure plugins are loaded before attempting to build type libs
Diffstat (limited to 'python/typelibrary.py')
| -rw-r--r-- | python/typelibrary.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/typelibrary.py b/python/typelibrary.py index 0a7bbccc..fb91a8e3 100644 --- a/python/typelibrary.py +++ b/python/typelibrary.py @@ -32,6 +32,7 @@ from . import architecture class TypeLibrary: def __init__(self, handle: core.BNTypeLibraryHandle): + binaryninja._init_plugins() self.handle: core.BNTypeLibraryHandle = core.handle_of_type(handle, core.BNTypeLibrary) def __del__(self): @@ -62,6 +63,7 @@ class TypeLibrary: :param str path: :rtype: TypeLibrary """ + binaryninja._init_plugins() handle: Optional[core.BNTypeLibraryHandle] = core.BNLoadTypeLibraryFromFile(path) if handle is None: return None @@ -314,7 +316,7 @@ class TypeLibrary: .. warning:: Use this api with extreme caution. """ - core.BNAddTypeLibraryNamedTypeSource(self.handle, QualifiedName(name)._to_core_struct(), source) + core.BNAddTypeLibraryNamedTypeSource(self.handle, types.QualifiedName(name)._to_core_struct(), source) def get_named_object(self, name: str) -> Optional[types.Type]: """ |
