Skip to content

Commit 0cdbd17

Browse files
Merge pull request swiftlang#8693 from adrian-prantl/127250635
Add missing nullptr check
2 parents 202ab23 + 3b48a55 commit 0cdbd17

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lldb/source/Plugins/ExpressionParser/Swift/SwiftASTManipulator.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,9 @@ llvm::Expected<swift::Type> SwiftASTManipulator::GetSwiftTypeForVariable(
910910
auto swift_type_or_err = m_swift_ast_ctx.GetSwiftType(referent_type);
911911
if (!swift_type_or_err)
912912
return swift_type_or_err.takeError();
913+
if (!swift_type_or_err.get())
914+
return llvm::make_error<llvm::StringError>("null Swift type",
915+
llvm::inconvertibleErrorCode());
913916

914917
// One tricky bit here is that this var may be an argument to the
915918
// function whose context we are emulating, and that argument might be

0 commit comments

Comments
 (0)