summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
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: