Skip to content

Commit 417f36c

Browse files
authored
Merge pull request llvm#6641 from compnerd/contextually-null
LanguageRuntime: ensure that we have a scratch context
2 parents c2a0e3e + 2270bcd commit 417f36c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntimeDynamicTypeResolution.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ SwiftLanguageRuntimeImpl::GetMemberVariableOffsetRemoteAST(
780780
llvm::StringRef member_name) {
781781
auto scratch_ctx =
782782
instance_type.GetTypeSystem().dyn_cast_or_null<SwiftASTContext>();
783-
if (scratch_ctx->HasFatalErrors())
783+
if (scratch_ctx == nullptr || scratch_ctx->HasFatalErrors())
784784
return {};
785785

786786
auto *remote_ast = &GetRemoteASTContext(*scratch_ctx);

0 commit comments

Comments
 (0)