Skip to content

Commit f500823

Browse files
Merge pull request #37422 from adrian-prantl/74503567-5.4
Add a defensive nullptr check.
2 parents 7a28293 + f397f2b commit f500823

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/ClangImporter/ImportType.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2302,6 +2302,8 @@ ImportedType ClangImporter::Implementation::importMethodParamsAndReturnType(
23022302
if (kind == SpecialMethodKind::NSDictionarySubscriptGetter &&
23032303
paramTy->isObjCIdType()) {
23042304
swiftParamTy = SwiftContext.getNSCopyingType();
2305+
if (!swiftParamTy)
2306+
return {Type(), false};
23052307
if (optionalityOfParam != OTK_None)
23062308
swiftParamTy = OptionalType::get(swiftParamTy);
23072309

0 commit comments

Comments
 (0)