diff options
| author | Peter LaFosse <peter@vector35.com> | 2021-07-07 08:26:29 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2021-09-05 10:09:09 -0400 |
| commit | 764063b2b44dbeba5f2f318c971e4f4acfb48427 (patch) | |
| tree | e014fe6a859b97a653cef80dc9db66a06c706c37 /python/flowgraph.py | |
| parent | d376db916f5fc83f9e654edf23364d200839ac50 (diff) | |
Refactor Python Types
Remove _mutable types
Diffstat (limited to 'python/flowgraph.py')
| -rw-r--r-- | python/flowgraph.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/python/flowgraph.py b/python/flowgraph.py index 0a0faae9..2fe4545a 100644 --- a/python/flowgraph.py +++ b/python/flowgraph.py @@ -162,8 +162,8 @@ class FlowGraphNode: func = function.Function(view, func_handle) if core.BNIsLowLevelILBasicBlock(block): - block = lowlevelil.LowLevelILBasicBlock(view, block, - lowlevelil.LowLevelILFunction(func.arch, core.BNGetBasicBlockLowLevelILFunction(block), func)) + block = lowlevelil.LowLevelILBasicBlock(block, + lowlevelil.LowLevelILFunction(func.arch, core.BNGetBasicBlockLowLevelILFunction(block), func), view) elif core.BNIsMediumLevelILBasicBlock(block): mlil_func = mediumlevelil.MediumLevelILFunction(func.arch, core.BNGetBasicBlockMediumLevelILFunction(block), func) block = mediumlevelil.MediumLevelILBasicBlock(block, mlil_func, view) @@ -338,6 +338,8 @@ class FlowGraphLayoutRequest: self.handle = core.BNStartFlowGraphLayout(graph.handle, None, self._cb) def __del__(self): + if core is None: + return self.abort() core.BNFreeFlowGraphLayoutRequest(self.handle) @@ -411,7 +413,8 @@ class FlowGraph: self.handle = handle def __del__(self): - core.BNFreeFlowGraph(self.handle) + if core is not None: + core.BNFreeFlowGraph(self.handle) def __repr__(self): function = self.function |
