summaryrefslogtreecommitdiff
path: root/python/function.py
diff options
context:
space:
mode:
authorBrandon Miller <brandon@vector35.com>2025-06-09 09:40:18 -0400
committerBrandon Miller <brandon@vector35.com>2025-06-09 09:43:50 -0400
commitc8f4346609f4b51474481d9e6b869076e5a96534 (patch)
treebe662b79367075b35e61b0712072f375f505a29f /python/function.py
parent6069b9db08041dffda12d37dd48c4b2cff2adea2 (diff)
More None checks when querying IL internal to API
Diffstat (limited to 'python/function.py')
-rw-r--r--python/function.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/function.py b/python/function.py
index 8fa8a0e4..7d14c2bb 100644
--- a/python/function.py
+++ b/python/function.py
@@ -2959,7 +2959,11 @@ class Function:
# Special case: function parameters have index 0 and are defined at the start of the function
def_addr = self.start
else:
- var_defs = self.mlil.get_var_definitions(var)
+ func_mlil = self.mlil
+ if func_mlil is None:
+ raise ValueError("Could not get definition for Variable")
+
+ var_defs = func_mlil.get_var_definitions(var)
if var_defs is None:
raise ValueError("Could not get definition for Variable")