From c8f4346609f4b51474481d9e6b869076e5a96534 Mon Sep 17 00:00:00 2001 From: Brandon Miller Date: Mon, 9 Jun 2025 09:40:18 -0400 Subject: More None checks when querying IL internal to API --- python/function.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'python/function.py') 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") -- cgit v1.3.1