diff options
| author | Rusty Wagner <rusty@vector35.com> | 2018-08-02 22:46:23 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2018-08-02 22:46:23 -0400 |
| commit | 657bc3ff2d000508bd4b4468e83ce37591655e17 (patch) | |
| tree | fb057f7192471de5b32da169c5923972f2bfb072 /flowgraphnode.cpp | |
| parent | 78ea5dced49f4576d71c4549001ecdb63a2da53e (diff) | |
Fix crash on flow graphs with no associated basic block
Diffstat (limited to 'flowgraphnode.cpp')
| -rw-r--r-- | flowgraphnode.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/flowgraphnode.cpp b/flowgraphnode.cpp index a49cb0d0..eea033a8 100644 --- a/flowgraphnode.cpp +++ b/flowgraphnode.cpp @@ -42,7 +42,10 @@ FlowGraphNode::FlowGraphNode(BNFlowGraphNode* node) Ref<BasicBlock> FlowGraphNode::GetBasicBlock() const { - return new BasicBlock(BNGetFlowGraphBasicBlock(m_object)); + BNBasicBlock* block = BNGetFlowGraphBasicBlock(m_object); + if (!block) + return nullptr; + return new BasicBlock(block); } |
