Skip to content

Commit

Permalink
Possible fix for AccessibilityBridge crash, need to retain object bef…
Browse files Browse the repository at this point in the history
…ore using it again
  • Loading branch information
fbcouch committed Feb 9, 2022
1 parent 65dfc9e commit 8680bfe
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ static void ReplaceSemanticsObject(SemanticsObject* oldObject,
assert(oldObject.node.id == newObject.uid);
NSNumber* nodeId = @(oldObject.node.id);
NSUInteger positionInChildlist = [oldObject.parent.children indexOfObject:oldObject];
[[oldObject retain] autorelease];
[objects removeObjectForKey:nodeId];
[oldObject.parent replaceChildAtIndex:positionInChildlist withChild:newObject];
objects[nodeId] = newObject;
Expand Down

0 comments on commit 8680bfe

Please sign in to comment.