Serialization: Fix null dereference in witness deserialization

Fix null dereference in deserialization logic for conformances. If
deserializing the witness itself failed, don't try to
get its actor isolation.

rdar://162158608
This commit is contained in:
Alexis Laferrière
2025-10-08 15:01:33 -07:00
parent a956308a07
commit 1db5ad0c4c

View File

@@ -9158,7 +9158,7 @@ void ModuleFile::finishNormalConformance(NormalProtocolConformance *conformance,
// Determine whether we need to enter the actor isolation of the witness.
std::optional<ActorIsolation> enterIsolation;
if (*rawIDIter++) {
if (*rawIDIter++ && witness) {
enterIsolation = getActorIsolation(witness);
}