summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2023-08-17 21:23:16 -0400
committerBrian Potchik <brian@vector35.com>2023-08-17 21:23:16 -0400
commitdf70e05b68cc3111b58ce1fa4e083f4e250c5ec9 (patch)
tree680fa480e18ef0587b61866d359f1ab87f665984 /python
parent6526587833507887839937101310521721723170 (diff)
The load API now returns None for an invalid handle.
Diffstat (limited to 'python')
-rw-r--r--python/binaryview.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 4b1ca035..2de53d32 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -2317,7 +2317,7 @@ class BinaryView:
handle = core.BNLoadBinaryView(raw_view.handle, update_analysis, progress_cfunc, metadata.Metadata(options).handle, False)
else:
raise NotImplementedError
- return BinaryView(handle=handle)
+ return BinaryView(handle=handle) if handle else None
@classmethod
def _unregister(cls, view: core.BNBinaryView) -> None: