Skip to content

Commit bb015b8

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 (cherry picked from commit 8c4d798)
1 parent a43ac0e commit bb015b8

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
@@ -310,6 +310,8 @@ UserExpression::Evaluate(ExecutionContext &exe_ctx,
310310
target->GetUserExpressionForLanguage(
311311
fixed_expression->c_str(), full_prefix, language, desired_type,
312312
options, ctx_obj, error));
313+
if (!fixed_expression_sp)
314+
break;
313315
DiagnosticManager fixed_diagnostic_manager;
314316
parse_success = fixed_expression_sp->Parse(
315317
fixed_diagnostic_manager, exe_ctx, execution_policy,

0 commit comments

Comments
 (0)