Skip to content

Commit 927d154

Browse files
committed
[lldb] Fix nullptr check condition
rdar://160890031 (cherry picked from commit 62a1df7)
1 parent ece777e commit 927d154

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)