diff options
| author | Peter LaFosse <peter@vector35.com> | 2018-05-15 11:59:43 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-05-15 11:59:43 -0400 |
| commit | d0c07251a780ca3b638b2cdff0afa00c92aea421 (patch) | |
| tree | f836fd06ccc59a57c135561922c33380adcdbdba /binaryview.cpp | |
| parent | 0094fe08a8f8fbb51c787a358494893391b11654 (diff) | |
Fix bug that caused null m_object pointer
Diffstat (limited to 'binaryview.cpp')
| -rw-r--r-- | binaryview.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/binaryview.cpp b/binaryview.cpp index 03821071..f663d337 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -2045,7 +2045,10 @@ vector<Ref<Section>> BinaryView::GetSectionsAt(uint64_t addr) Ref<Section> BinaryView::GetSectionByName(const string& name) { - return new Section(BNGetSectionByName(m_object, name.c_str())); + BNSection* section = BNGetSectionByName(m_object, name.c_str()); + if (section) + return new Section(section); + return nullptr; } |
