Skip to content

Commit 6d92da4

Browse files
committed
Don't allow null diagnoastics in DiagnosticManager
1 parent bbe269e commit 6d92da4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2855,7 +2855,8 @@ class StoringDiagnosticConsumer : public swift::DiagnosticConsumer {
28552855
}
28562856

28572857
void AddDiagnostic(std::unique_ptr<Diagnostic> diagnostic) {
2858-
m_diagnostics.push_back(std::move(diagnostic));
2858+
if (diagnostic)
2859+
m_diagnostics.push_back(std::move(diagnostic));
28592860
}
28602861

28612862
private:

0 commit comments

Comments
 (0)