Skip to content

Commit 8c4d798

Browse files
committed
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
1 parent 272ea28 commit 8c4d798

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lldb/source/Expression/UserExpression.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ UserExpression::Evaluate(ExecutionContext &exe_ctx,
300300
target->GetUserExpressionForLanguage(
301301
fixed_expression->c_str(), full_prefix, language, desired_type,
302302
options, ctx_obj, error));
303+
if (!fixed_expression_sp)
304+
break;
303305
DiagnosticManager fixed_diagnostic_manager;
304306
parse_success = fixed_expression_sp->Parse(
305307
fixed_diagnostic_manager, exe_ctx, execution_policy,

0 commit comments

Comments
 (0)