diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2017-11-01 00:42:32 -0400 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2017-11-01 00:42:40 -0400 |
| commit | 9a70f039ffd68190a3a6efc53a4fab3cf20b7963 (patch) | |
| tree | 8c9fc5efb34720ba1fc8dadf548f048a1f09f538 /python | |
| parent | de70f093cc429a125dde201cfe245b616c10ebce (diff) | |
fix new scripting provider aliases when no current context exists
Diffstat (limited to 'python')
| -rw-r--r-- | python/scriptingprovider.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/python/scriptingprovider.py b/python/scriptingprovider.py index 211d2fb7..f9758cc9 100644 --- a/python/scriptingprovider.py +++ b/python/scriptingprovider.py @@ -540,8 +540,12 @@ class PythonScriptingInstance(ScriptingInstance): self.locals["current_address"] = self.active_addr self.locals["here"] = self.active_addr self.locals["current_selection"] = (self.active_selection_begin, self.active_selection_end) - self.locals["current_llil"] = self.active_func.low_level_il - self.locals["current_mlil"] = self.active_func.medium_level_il + if self.active_func == None: + self.locals["current_llil"] = None + self.locals["current_mlil"] = None + else: + self.locals["current_llil"] = self.active_func.low_level_il + self.locals["current_mlil"] = self.active_func.medium_level_il self.interpreter.runsource(code) |
