From d0c07251a780ca3b638b2cdff0afa00c92aea421 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Tue, 15 May 2018 11:59:43 -0400 Subject: Fix bug that caused null m_object pointer --- binaryview.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'binaryview.cpp') diff --git a/binaryview.cpp b/binaryview.cpp index 03821071..f663d337 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -2045,7 +2045,10 @@ vector> BinaryView::GetSectionsAt(uint64_t addr) Ref
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; } -- cgit v1.3.1