Skip to content

Commit a45f19c

Browse files
Merge pull request #11468 from adrian-prantl/cherry-pick-swift-release-6.2.1-lldb-Fix-nullptr-check-condition
[Cherry-pick into swift/release/6.2.1] [lldb] Fix nullptr check condition
2 parents ece777e + 927d154 commit a45f19c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6603,7 +6603,7 @@ SwiftASTContext::GetBitSize(opaque_compiler_type_t type,
66036603
// Check that the type has been bound successfully -- and if not,
66046604
// log the event and bail out to avoid an infinite loop.
66056605
swift::CanType swift_bound_type(GetCanonicalSwiftType(bound_type));
6606-
if (swift_bound_type && swift_bound_type->hasTypeParameter())
6606+
if (!swift_bound_type || swift_bound_type->hasTypeParameter())
66076607
return llvm::createStringError("Cannot bind type: %s",
66086608
bound_type.GetTypeName().AsCString(""));
66096609

0 commit comments

Comments
 (0)