Skip to content

Commit d227c8a

Browse files
committed
Add missing nullptr check.
While it's the plugin's moral duty to also set the error, this code can't depend on that.
1 parent e086e0a commit d227c8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Expression/UserExpression.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ UserExpression::Evaluate(ExecutionContext &exe_ctx,
255255
target->GetUserExpressionForLanguage(expr, full_prefix, language,
256256
desired_type, options, ctx_obj,
257257
error));
258-
if (error.Fail()) {
258+
if (error.Fail() || !user_expression_sp) {
259259
LLDB_LOG(log, "== [UserExpression::Evaluate] Getting expression: {0} ==",
260260
error.AsCString());
261261
return lldb::eExpressionSetupError;

0 commit comments

Comments
 (0)