Files
react-native/React
Valentin Shergin 7c83eaba80 Fabric: Fixed crash in [RCTParagraphComponentView accessibilityElements]
Summary:
Now we check for `_state` being nullptr before dereferencing this.

`accessibilityElements` (as a bunch of other methods that have the same check) can be called by OS any moment (we cannot predict when), so at some very rare moments, it can be called when the view is not fully initialized yet. To prevent crashing we just need to return some default value indicating that the view is empty.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D24095654

fbshipit-source-id: d8a37f269c5bf7718acb0b512e7a9313e199398e
2020-10-04 19:12:22 -07:00
..