summaryrefslogtreecommitdiff
path: root/python/variable.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/variable.py')
-rw-r--r--python/variable.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/python/variable.py b/python/variable.py
index 14929557..ee0d93a4 100644
--- a/python/variable.py
+++ b/python/variable.py
@@ -728,9 +728,7 @@ class Variable(CoreVariable):
def type(self) -> Optional['binaryninja.types.Type']:
var_type_conf = core.BNGetVariableType(self._function.handle, self.to_BNVariable())
if var_type_conf.type:
- ref_handle = core.BNNewTypeReference(var_type_conf.type)
- assert ref_handle is not None, f"core.BNNewTypeReference returned None {var_type_conf} {var_type_conf.type}"
- return binaryninja.types.Type.create(ref_handle, self._function.platform, var_type_conf.confidence)
+ return binaryninja.types.Type.create(var_type_conf.type, self._function.platform, var_type_conf.confidence)
return None
@type.setter