Skip to content

Commit bf75f38

Browse files
committed
[RemoteMirror] Add a missing NULL check when reading metadata in readMetadataAndValueErrorExistential.
rdar://problem/49246601
1 parent e0f1994 commit bf75f38

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/swift/Remote/MetadataReader.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,9 @@ class MetadataReader {
362362
bool isBridged = false;
363363

364364
auto Meta = readMetadata(*MetadataAddress);
365+
if (!Meta)
366+
return None;
367+
365368
if (auto ClassMeta = dyn_cast<TargetClassMetadata<Runtime>>(Meta)) {
366369
if (ClassMeta->isPureObjC()) {
367370
// If we can determine the Objective-C class name, this is probably an

0 commit comments

Comments
 (0)