Skip to content

Commit 4533c94

Browse files
committed
Add a missing defensive nullptr check.
1 parent b2f627b commit 4533c94

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,8 @@ MaterializeVariable(SwiftASTManipulatorBase::VariableInfo &variable,
911911
ToCompilerType(transformed_type->mapTypeOutOfContext().getPointer());
912912
auto swift_ast_ctx =
913913
actual_type.GetTypeSystem().dyn_cast_or_null<SwiftASTContext>();
914+
if (!swift_ast_ctx)
915+
return {};
914916

915917
actual_type =
916918
swift_ast_ctx->GetTypeRefType(actual_type.GetOpaqueQualType());

0 commit comments

Comments
 (0)