Skip to content

Commit b947ab3

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. (cherry picked from commit d227c8a)
1 parent f7e4303 commit b947ab3

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
@@ -261,7 +261,7 @@ UserExpression::Evaluate(ExecutionContext &exe_ctx,
261261
target->GetUserExpressionForLanguage(expr, full_prefix, language,
262262
desired_type, options, ctx_obj,
263263
error));
264-
if (error.Fail()) {
264+
if (error.Fail() || !user_expression_sp) {
265265
LLDB_LOG(log, "== [UserExpression::Evaluate] Getting expression: {0} ==",
266266
error.AsCString());
267267
return lldb::eExpressionSetupError;

0 commit comments

Comments
 (0)