Skip to content

Commit b0a326c

Browse files
committed
Add a nullptr check
I've seen an LLDB crash log that suggests that this can happen, but I don't have a reproducer for it. rdar://89177494
1 parent e3b2719 commit b0a326c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stdlib/public/Reflection/TypeLowering.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2412,6 +2412,11 @@ class LowerType
24122412
const TypeInfo *
24132413
TypeConverter::getTypeInfo(const TypeRef *TR,
24142414
remote::TypeInfoProvider *ExternalTypeInfo) {
2415+
if (!TR) {
2416+
DEBUG_LOG(fprintf(stderr, "null TypeRef"));
2417+
return nullptr;
2418+
}
2419+
24152420
// See if we already computed the result
24162421
auto found = Cache.find({TR, ExternalTypeInfo});
24172422
if (found != Cache.end())

0 commit comments

Comments
 (0)