summaryrefslogtreecommitdiff
path: root/python/binaryview.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2023-06-09 14:30:17 -0400
committerPeter LaFosse <peter@vector35.com>2023-06-09 14:30:17 -0400
commitecda1f47ca11e53db9a0d57f7367277c3d237904 (patch)
tree75568c500f84ee57dd4103b698b8fe849719dffa /python/binaryview.py
parent1735074083308579862338836141845002639667 (diff)
Prevent exception on close in FunctionList
Diffstat (limited to 'python/binaryview.py')
-rw-r--r--python/binaryview.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 1e0dc9b4..586c9f6e 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -1882,7 +1882,8 @@ class FunctionList:
raise ValueError("FunctionList.__getitem__ supports argument of type integer or slice")
def __del__(self):
- core.BNFreeFunctionList(self._funcs, len(self))
+ if core is not None:
+ core.BNFreeFunctionList(self._funcs, len(self))
def __len__(self) -> int:
return self._count