Skip to content

Commit 8298c72

Browse files
authored
Merge pull request swiftlang#41790 from adrian-prantl/89177494
Add a nullptr check
2 parents abc8aa6 + b0a326c commit 8298c72

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
@@ -2427,6 +2427,11 @@ class LowerType
24272427
const TypeInfo *
24282428
TypeConverter::getTypeInfo(const TypeRef *TR,
24292429
remote::TypeInfoProvider *ExternalTypeInfo) {
2430+
if (!TR) {
2431+
DEBUG_LOG(fprintf(stderr, "null TypeRef"));
2432+
return nullptr;
2433+
}
2434+
24302435
// See if we already computed the result
24312436
auto found = Cache.find({TR, ExternalTypeInfo});
24322437
if (found != Cache.end())

0 commit comments

Comments
 (0)