Skip to content

Commit 8d68d2b

Browse files
committed
Add a missing nullptr check.
rdar://77329042
1 parent 8463f2a commit 8d68d2b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lldb/source/Plugins/Language/Swift/SwiftHashedContainer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,12 +662,13 @@ HashedCollectionConfig::CreateHandler(ValueObject &valobj) const {
662662

663663
ValueObjectSP bobject_sp =
664664
variant_sp->GetChildAtNamePath({g_object, g_rawValue});
665+
if (!bobject_sp)
666+
return nullptr;
665667

666668
lldb::addr_t storage_location =
667669
bobject_sp->GetValueAsUnsigned(LLDB_INVALID_ADDRESS);
668-
if (storage_location == LLDB_INVALID_ADDRESS) {
670+
if (storage_location == LLDB_INVALID_ADDRESS)
669671
return nullptr;
670-
}
671672

672673
ProcessSP process_sp = exe_ctx.GetProcessSP();
673674
if (!process_sp)

0 commit comments

Comments
 (0)