diff options
| author | Peter LaFosse <peter@vector35.com> | 2021-09-30 17:04:47 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2021-09-30 17:04:47 -0400 |
| commit | 8c00d6124607932ce8c02aeac5a20b0523f0a609 (patch) | |
| tree | 719c427699b4d2e541dcee1065b1cf38a7515fe2 /python | |
| parent | ac418b75ea4c6af71a419f9e5b8a05dc36427542 (diff) | |
Add some additional asserts around calls to BNCreatePlatform
Diffstat (limited to 'python')
| -rw-r--r-- | python/platform.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/platform.py b/python/platform.py index 0d06e362..2328fb17 100644 --- a/python/platform.py +++ b/python/platform.py @@ -68,11 +68,13 @@ class Platform(metaclass=_PlatformMetaClass): _arch = arch if self.__class__.type_file_path is None: _handle = core.BNCreatePlatform(arch.handle, self.__class__.name) + assert _handle is not None else: dir_buf = (ctypes.c_char_p * len(self.__class__.type_include_dirs))() for (i, dir) in enumerate(self.__class__.type_include_dirs): dir_buf[i] = dir.encode('charmap') _handle = core.BNCreatePlatformWithTypes(arch.handle, self.__class__.name, self.__class__.type_file_path, dir_buf, len(self.__class__.type_include_dirs)) + assert _handle is not None else: _handle = handle _arch = architecture.CoreArchitecture._from_cache(core.BNGetPlatformArchitecture(_handle)) |
