diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:01:00 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:01:00 +0000 |
| commit | 23629167fefb8117a4d2cc9213c8a29d5b4a1197 (patch) | |
| tree | c410512ef1b5e0f0e81b7f333cafabc3ad716f5d /source/Plugins/SymbolFile/PDB/PDBASTParser.cpp | |
| parent | ef5d0b5e97ec8e6fa395d377b09aa7755e345b4f (diff) | |
Diffstat (limited to 'source/Plugins/SymbolFile/PDB/PDBASTParser.cpp')
| -rw-r--r-- | source/Plugins/SymbolFile/PDB/PDBASTParser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp b/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp index 9b98ebe112a2..7802d6f0d859 100644 --- a/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp +++ b/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp @@ -124,6 +124,8 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) { } else if (auto type_def = llvm::dyn_cast<PDBSymbolTypeTypedef>(&type)) { lldb_private::Type *target_type = m_ast.GetSymbolFile()->ResolveTypeUID(type_def->getTypeId()); + if (!target_type) + return nullptr; std::string name = type_def->getName(); uint64_t bytes = type_def->getLength(); if (!target_type) @@ -179,6 +181,8 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) { lldb_private::Type *element_type = m_ast.GetSymbolFile()->ResolveTypeUID(element_uid); + if (!element_type) + return nullptr; CompilerType element_ast_type = element_type->GetFullCompilerType(); CompilerType array_ast_type = m_ast.CreateArrayType(element_ast_type, num_elements, false); |
