SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

Do not crash inside getEncodedScreenSizeWithoutVerticalInsets if SurfaceMountingManager is null (#53752)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53752

Currently we `Objects.requireNotNull` on the `SurfaceMountingManager` inside the `getEncodedScreenSizeWithoutVerticalInsets`
function. However the `SurfaceMountingManager` could be null.
In that scenario, I'm returning 0 here (that will restore the old broken behavior, with the modal rendering on the top left corner for the first frame), instead of letting the app crash.

Changelog:
[Android] [Fixed] - Do not crash inside getEncodedScreenSizeWithoutVerticalInsets if SurfaceMountingManager is null

Reviewed By: javache

Differential Revision: D82225855

fbshipit-source-id: df84db612e77b6b981bc28afc0d293867b5d3b2e
N
Nicola Corti committed
f59a6f9508f92391b26d44854f3da238ccbc5e62
Parent: 91d427f
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 9/12/2025, 2:44:00 PM