diff --git a/lldb/source/Plugins/SymbolVendor/wasm/SymbolVendorWasm.cpp b/lldb/source/Plugins/SymbolVendor/wasm/SymbolVendorWasm.cpp index 6290843a89872..91b10ea64535d 100644 --- a/lldb/source/Plugins/SymbolVendor/wasm/SymbolVendorWasm.cpp +++ b/lldb/source/Plugins/SymbolVendor/wasm/SymbolVendorWasm.cpp @@ -109,6 +109,9 @@ SymbolVendorWasm::CreateInstance(const lldb::ModuleSP &module_sp, SectionList *module_section_list = module_sp->GetSectionList(); SectionList *objfile_section_list = sym_objfile_sp->GetSectionList(); + if (!module_section_list || !objfile_section_list) + return nullptr; + static const SectionType g_sections[] = { eSectionTypeDWARFDebugAbbrev, eSectionTypeDWARFDebugAddr, eSectionTypeDWARFDebugAranges, eSectionTypeDWARFDebugCuIndex,