summaryrefslogtreecommitdiff
path: root/python/binaryview.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/binaryview.py')
-rw-r--r--python/binaryview.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 1fde4bcd..2af37321 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -3956,7 +3956,10 @@ class BinaryView(object):
elif sym_type is not None:
raise AttributeError("Provided sym_type is not of type `binaryninja.Type`")
- core.BNDefineAutoSymbolAndVariableOrFunction(self.handle, plat.handle, sym.handle, sym_type)
+ sym = core.BNDefineAutoSymbolAndVariableOrFunction(self.handle, plat.handle, sym.handle, sym_type)
+ if sym is None:
+ return None
+ return types.Symbol(None, None, None, handle = sym)
def undefine_auto_symbol(self, sym):
"""