diff options
| author | Glenn Smith <glenn@vector35.com> | 2024-06-11 12:24:18 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2024-06-11 12:24:36 -0400 |
| commit | 1707989955983663933377329952944577678076 (patch) | |
| tree | a9aaa5faccb19998b02de68b25e49a4c83a9026d /view/elf | |
| parent | 10f3cdf86d4711e7621572b1ff7a2d893647be40 (diff) | |
ELF: Fix crash if an entry point function fails to load
Just needed a null check around this
Diffstat (limited to 'view/elf')
| -rw-r--r-- | view/elf/elfview.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/view/elf/elfview.cpp b/view/elf/elfview.cpp index a01d043b..defd6600 100644 --- a/view/elf/elfview.cpp +++ b/view/elf/elfview.cpp @@ -1541,12 +1541,18 @@ bool ElfView::Init() if (entryArch != entryPointArch) { auto func = AddFunctionForAnalysis(platform->GetRelatedPlatform(entryArch), entry); - AddToEntryFunctions(func); + if (func) + { + AddToEntryFunctions(func); + } } else { auto func = AddFunctionForAnalysis(platform, entry); - AddToEntryFunctions(func); + if (func) + { + AddToEntryFunctions(func); + } } m_logger->LogDebug("Adding function start: %#" PRIx64 "\n", entry); |
