[Lldb-commits] [lldb] 9fd54cf - [LLDB][NativePDB] Add nullptr checking.
Zequan Wu via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 16 17:01:54 PDT 2022
Author: Zequan Wu
Date: 2022-08-16T17:01:47-07:00
New Revision: 9fd54cf5c9620504c8c16cf885354b6f9d82f638
URL: https://github.com/llvm/llvm-project/commit/9fd54cf5c9620504c8c16cf885354b6f9d82f638
DIFF: https://github.com/llvm/llvm-project/commit/9fd54cf5c9620504c8c16cf885354b6f9d82f638.diff
LOG: [LLDB][NativePDB] Add nullptr checking.
Added:
Modified:
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index c596d9c7a1ae7..cf17e616f659f 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -1718,6 +1718,8 @@ VariableSP SymbolFileNativePDB::CreateLocalVariable(PdbCompilandSymId scope_id,
CompilandIndexItem *cii = m_index->compilands().GetCompiland(var_id.modi);
CompUnitSP comp_unit_sp = GetOrCreateCompileUnit(*cii);
TypeSP type_sp = GetOrCreateType(var_info.type);
+ if (!type_sp)
+ return nullptr;
std::string name = var_info.name.str();
Declaration decl;
SymbolFileTypeSP sftype =
More information about the lldb-commits
mailing list