Author: Adrian Prantl Date: 2024-05-07T13:44:44-07:00 New Revision: 8c4d7989c2b4a7e251afc3b13002611646de90b6
URL: https://github.com/llvm/llvm-project/commit/8c4d7989c2b4a7e251afc3b13002611646de90b6 DIFF: https://github.com/llvm/llvm-project/commit/8c4d7989c2b4a7e251afc3b13002611646de90b6.diff LOG: Add a missing check for nullptr This can't happen with Clang, but I've seen a crash report from the Swift plugin where this happened. rdar://126564844 Added: Modified: lldb/source/Expression/UserExpression.cpp Removed: ################################################################################ diff --git a/lldb/source/Expression/UserExpression.cpp b/lldb/source/Expression/UserExpression.cpp index 06fdb7007ced..b78f43995767 100644 --- a/lldb/source/Expression/UserExpression.cpp +++ b/lldb/source/Expression/UserExpression.cpp @@ -300,6 +300,8 @@ UserExpression::Evaluate(ExecutionContext &exe_ctx, target->GetUserExpressionForLanguage( fixed_expression->c_str(), full_prefix, language, desired_type, options, ctx_obj, error)); + if (!fixed_expression_sp) + break; DiagnosticManager fixed_diagnostic_manager; parse_success = fixed_expression_sp->Parse( fixed_diagnostic_manager, exe_ctx, execution_policy, _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits