Skip to content

Commit 93e1607

Browse files
Merge pull request #11467 from adrian-prantl/cherry-pick-next-lldb-Fix-nullptr-check-condition
[Cherry-pick into next] [lldb] Fix nullptr check condition
2 parents 1ac9a58 + 7a8b4fe commit 93e1607

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
@@ -6658,7 +6658,7 @@ SwiftASTContext::GetBitSize(opaque_compiler_type_t type,
66586658
// Check that the type has been bound successfully -- and if not,
66596659
// log the event and bail out to avoid an infinite loop.
66606660
swift::CanType swift_bound_type(GetCanonicalSwiftType(bound_type));
6661-
if (swift_bound_type && swift_bound_type->hasTypeParameter())
6661+
if (!swift_bound_type || swift_bound_type->hasTypeParameter())
66626662
return llvm::createStringError("Cannot bind type: %s",
66636663
bound_type.GetTypeName().AsCString(""));
66646664

0 commit comments

Comments
 (0)