Fix LogBox dealloc crashing Mac Catalyst (#53259)

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

delegate.window is not supported in Mac Catalyst, causing a crash in various scenarios such as Metro refresh.

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D80189486

fbshipit-source-id: d0e8156f8f95769c114b497f53731876478fb1f4
This commit is contained in:
Devan Buggay
2025-08-13 21:56:03 -07:00
committed by Facebook GitHub Bot
parent 94d260ee6a
commit 22a4f79224
@@ -81,7 +81,9 @@
- (void)dealloc
{
#if !TARGET_OS_MACCATALYST // sharedApplication.delegate is not available on Mac Catalyst
[RCTSharedApplication().delegate.window makeKeyWindow];
#endif
}
- (void)show