Skip to content

Commit d082451

Browse files
Merge pull request llvm#5967 from adrian-prantl/cherry-pick-20221013
Add a missing nullptr check.
2 parents 37bd1bc + 06b8a43 commit d082451

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,8 +1484,10 @@ void *TypeSystemSwiftTypeRef::ReconstructType(opaque_compiler_type_t type) {
14841484
}
14851485

14861486
CompilerType TypeSystemSwiftTypeRef::ReconstructType(CompilerType type) {
1487-
return {GetSwiftASTContext()->weak_from_this(),
1488-
ReconstructType(type.GetOpaqueQualType())};
1487+
if (auto *swift_ast_context = GetSwiftASTContext())
1488+
return {swift_ast_context->weak_from_this(),
1489+
ReconstructType(type.GetOpaqueQualType())};
1490+
return {};
14891491
}
14901492

14911493
CompilerType TypeSystemSwiftTypeRef::GetTypeFromMangledTypename(

0 commit comments

Comments
 (0)